diff options
author | Graham Christensen <graham@grahamc.com> | 2017-12-23 07:19:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-23 07:19:45 -0500 |
commit | b5a61f2c599ac665e3c3129258ea8671cb5760af (patch) | |
tree | ac16b806bfd54846edba76b0f21ff5d929570ff4 /lib/lists.nix | |
parent | d3a0eb320a5e28a19b82f813e001fa832d7ef1d3 (diff) |
Revert "nixos: doc: implement related packages in the manual"
Diffstat (limited to 'lib/lists.nix')
-rw-r--r-- | lib/lists.nix | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/lists.nix b/lib/lists.nix index f7e09040a5aa6..8f67c6bb0ca3b 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -385,30 +385,6 @@ rec { if len < 2 then list else (sort strictLess pivot.left) ++ [ first ] ++ (sort strictLess pivot.right)); - /* Compare two lists element-by-element. - - Example: - compareLists compare [] [] - => 0 - compareLists compare [] [ "a" ] - => -1 - compareLists compare [ "a" ] [] - => 1 - compareLists compare [ "a" "b" ] [ "a" "c" ] - => 1 - */ - compareLists = cmp: a: b: - if a == [] - then if b == [] - then 0 - else -1 - else if b == [] - then 1 - else let rel = cmp (head a) (head b); in - if rel == 0 - then compareLists cmp (tail a) (tail b) - else rel; - /* Return the first (at most) N elements of a list. Example: |