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;
|
in uniqList {outputList=newOutputList;
|
||||||
inputList = (tail inputList);};
|
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:
|
condConcat = name: list: checker:
|
||||||
if list == [] then name else
|
if list == [] then name else
|
||||||
|
|
Loading…
Reference in a new issue