From b5a61f2c599ac665e3c3129258ea8671cb5760af Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sat, 23 Dec 2017 07:19:45 -0500 Subject: Revert "nixos: doc: implement related packages in the manual" --- lib/lists.nix | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'lib/lists.nix') diff --git a/lib/lists.nix b/lib/lists.nix index f7e09040a5a..8f67c6bb0ca 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: -- cgit 1.4.1