about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix
new file mode 100644
index 0000000000..44c0349387
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-foldl.nix
@@ -0,0 +1,5 @@
+[
+  (builtins.foldl' builtins.add 0 [1 2 3])
+  (builtins.foldl' (l1: l2: l1 ++ l2) [0] [[1] [2 3]])
+  (builtins.foldl' (x: y: if x == 0 then y else x * y) 0 [1 2])
+]