about summary refs log blame commit diff
path: root/tests/lang/eval-okay-list.nix
blob: 72a120d0d0f286dd4870c81d2b71cdc80e5c982b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
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"];
    
}