Fix evaluation problem

http://hydra.nixos.org/build/2940128
This commit is contained in:
Eelco Dolstra 2012-08-14 13:42:43 -04:00
parent f136179002
commit 9d516f16fc

View File

@ -1,7 +1,7 @@
# General list operations. # General list operations.
rec { rec {
inherit (builtins) elemAt head tail length isList add sub lessThan; inherit (builtins) head tail length isList add sub lessThan;
# Create a list consisting of a single element. `singleton x' is # Create a list consisting of a single element. `singleton x' is
@ -22,7 +22,7 @@ rec {
fold' = n: fold' = n:
if n == len if n == len
then nul then nul
else op (elemAt list n) (fold' (add n 1)); else op (builtins.elemAt list n) (fold' (add n 1));
in fold' 0 in fold' 0
else op: nul: else op: nul:
let fold' = list: let fold' = list:
@ -42,7 +42,7 @@ rec {
foldl' = n: foldl' = n:
if n == minus1 if n == minus1
then nul then nul
else op (foldl' (sub n 1)) (elemAt list n); else op (foldl' (sub n 1)) (builtins.elemAt list n);
in foldl' (sub (length list) 1) in foldl' (sub (length list) 1)
else op: else op:
let foldl' = nul: list: let foldl' = nul: list: