[Nix-dev] Nix 1.2 released
Florian Friesdorf
flo at chaoflow.net
Thu Dec 13 12:02:30 CET 2012
Andres Loeh <ksnix at andres-loeh.de> writes:
> Why don't you just try it?
>
> $ echo 'let lib = import <nixpkgs/pkgs/lib/default.nix>; in lib.elem 1
> [1 2 (throw "boo")]' | nix-instantiate --eval-only -
> true
> $ echo 'let lib = import <nixpkgs/pkgs/lib/default.nix>; in lib.elem 2
> [1 2 (throw "boo")]' | nix-instantiate --eval-only -
> true
> $ echo 'let lib = import <nixpkgs/pkgs/lib/default.nix>; in lib.elem 3
> [1 2 (throw "boo")]' | nix-instantiate --eval-only -
> error: user-thrown exception: boo
>
> Seems lazy to me.
Thanks Andres and Shea for the explanations.
At this point I definitely get that elem is lazy. I'm a bit confused
about the direction fold(right) is working, but will play with it a bit
before asking further questions.
thanks again!
--
Florian Friesdorf <flo at chaoflow.net>
GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: flo at chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20121213/62d7b962/attachment.bin
More information about the nix-dev
mailing list