diff options
author | Shea Levy <shea@shealevy.com> | 2013-02-01 00:39:26 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2013-02-01 00:39:26 -0500 |
commit | da3be9c6b23ac6677821597223c142034b2b7c91 (patch) | |
tree | 4c9688b21fac4ae20c2825497b15e746d9fa547c /pkgs/lib/lists.nix | |
parent | 00258a362d6d9571d1e16524c5ee17fe0ef824a2 (diff) | |
download | nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar.gz nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar.bz2 nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar.lz nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar.xz nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.tar.zst nixpkgs-da3be9c6b23ac6677821597223c142034b2b7c91.zip |
Add deepSeq lib function
Diffstat (limited to 'pkgs/lib/lists.nix')
-rw-r--r-- | pkgs/lib/lists.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/lists.nix b/pkgs/lib/lists.nix index ede7018fb23..0916355568c 100644 --- a/pkgs/lib/lists.nix +++ b/pkgs/lib/lists.nix @@ -1,4 +1,7 @@ # General list operations. +with { + inherit (import ./trivial.nix) deepSeq; +}; rec { inherit (builtins) head tail length isList add sub lessThan; @@ -220,4 +223,5 @@ rec { ++ zipTwoLists (tail xs) (tail ys) else []; + deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y; } |