From ba61dfd69504ec6263a9dee9931d93adeb6f3142 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 7 Jul 2025 21:52:08 +0200 Subject: Initialize repository --- test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix (limited to 'test/testdata/eval-okay-foldlStrict-lazy-initial-accumulator.nix') 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 @@ +# 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 ] -- cgit v1.2.3