mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
A few library functions added.
svn path=/nixpkgs/trunk/; revision=10118
This commit is contained in:
parent
437f21219f
commit
5116a523a9
@ -222,6 +222,19 @@ rec {
|
||||
in uniqList {outputList=newOutputList;
|
||||
inputList = (tail inputList);};
|
||||
|
||||
uniqListExt = {inputList, outputList ? [],
|
||||
getter ? (x : x), compare ? (x: y: x==y)}:
|
||||
if (inputList == []) then outputList else
|
||||
let x=head inputList;
|
||||
isX = y: (compare (getter y) (getter x));
|
||||
newOutputList = outputList ++
|
||||
(if any isX outputList then [] else [x]);
|
||||
in uniqListExt {outputList=newOutputList;
|
||||
inputList = (tail inputList);
|
||||
inherit getter compare;
|
||||
};
|
||||
|
||||
|
||||
|
||||
condConcat = name: list: checker:
|
||||
if list == [] then name else
|
||||
|
Loading…
Reference in New Issue
Block a user