Hi, On 12/12/12 17:15, Shea Levy wrote:
>>> The elem library function evaluates all list elements instead of >>> returning "true" after finding a matching element. >> Sure about that? This seems lazy enough: >> >> elem = >> builtins.elem or >> (x: list: fold (a: bs: x == a || bs) false list); >> > Shouldn't the bs come first? i.e. (a: bs: bs || x == a)? Not if you want to check from left to right. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
