* Function optionals.
svn path=/nixpkgs/trunk/; revision=10553
This commit is contained in:
parent
248004a624
commit
48f544d2e3
@ -180,6 +180,10 @@ rec {
|
|||||||
# (e.g. `++ optional (system == "i686-linux") flashplayer').
|
# (e.g. `++ optional (system == "i686-linux") flashplayer').
|
||||||
optional = cond: elem: if cond then [elem] else [];
|
optional = cond: elem: if cond then [elem] else [];
|
||||||
|
|
||||||
|
|
||||||
|
# Return a list or an empty list, dependening on a boolean value.
|
||||||
|
optionals = cond: elems: if cond then elems else [];
|
||||||
|
|
||||||
|
|
||||||
# Return a list of integers from `first' up to and including `last'.
|
# Return a list of integers from `first' up to and including `last'.
|
||||||
range = first: last:
|
range = first: last:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user