about summary refs log tree commit diff
path: root/tvix/eval/src/tests/nix_tests/eval-okay-foldlStrict-lazy-initial-accumulator.nix
blob: abcd5366ab8c21be914d5f0412f7af35777c8e2f (plain) (blame)
1
2
3
4
5
6
# Checks that the nul value for the accumulator is not forced unconditionally.
# Some languages provide a foldl' that is strict in this argument, but Nix does not.
builtins.foldl'
  (_: x: x)
  (throw "This is never forced")
  [ "but the results of applying op are" 42 ]