Andres Loeh <[email protected]> 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 <[email protected]>
  GPG FPR: 7A13 5EEE 1421 9FC2 108D  BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: [email protected]
IRC: chaoflow on freenode,ircnet,blafasel,OFTC

Attachment: pgp2uPlrfbVpz.pgp
Description: PGP signature

_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to