diff options
Diffstat (limited to 'test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix')
-rw-r--r-- | test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix b/test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix new file mode 100644 index 0000000..abcd536 --- /dev/null +++ b/test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix | |||
@@ -0,0 +1,6 @@ | |||
1 | # Checks that the nul value for the accumulator is not forced unconditionally. | ||
2 | # Some languages provide a foldl' that is strict in this argument, but Nix does not. | ||
3 | builtins.foldl' | ||
4 | (_: x: x) | ||
5 | (throw "This is never forced") | ||
6 | [ "but the results of applying op are" 42 ] | ||