about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/eval-okay-foldlStrict-lazy-elements.nix
blob: c666e07f3aee4412899eb54973e49dd69cb25ac3 (plain) (blame)
1
2
3
4
5
6
7
8
9
# Tests that the rhs argument of op is not forced unconditionally
let
  lst = builtins.foldl'
    (acc: x: acc ++ [ x ])
    [ ]
    [ 42 (throw "this shouldn't be evaluated") ];
in

builtins.head lst