aboutsummaryrefslogtreecommitdiff
path: root/lib/lists.nix
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2017-12-23 07:19:45 -0500
committerGitHub <noreply@github.com>2017-12-23 07:19:45 -0500
commitb5a61f2c599ac665e3c3129258ea8671cb5760af (patch)
treeac16b806bfd54846edba76b0f21ff5d929570ff4 /lib/lists.nix
parentd3a0eb320a5e28a19b82f813e001fa832d7ef1d3 (diff)
Revert "nixos: doc: implement related packages in the manual"
Diffstat (limited to '')
-rw-r--r--lib/lists.nix24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/lists.nix b/lib/lists.nix
index f7e09040a5aa..8f67c6bb0ca3 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: