[Nix-dev] Nix 1.2 released

Eelco Dolstra eelco.dolstra at logicblox.com
Wed Dec 12 17:07:02 CET 2012


Hi,

On 12/12/12 03:28, Florian Friesdorf wrote:

>>   * New primops: concatLists, elem, elemAt and filter.
> 
> 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);

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list