diff options
Diffstat (limited to 'tests/lang/eval-okay-list.nix')
-rw-r--r-- | tests/lang/eval-okay-list.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lang/eval-okay-list.nix b/tests/lang/eval-okay-list.nix new file mode 100644 index 000000000..72a120d0d --- /dev/null +++ b/tests/lang/eval-okay-list.nix @@ -0,0 +1,13 @@ +let { + + fold = op: nul: list: + if list == [] + then nul + else op (builtins.head list) (fold op nul (builtins.tail list)); + + concat = + fold (x: y: x + y) ""; + + body = concat ["foo" "bar" "bla" "test"]; + +}
\ No newline at end of file |