forked from mirrors/nixpkgs
Added optionalString (similar to optional)
svn path=/nixpkgs/trunk/; revision=11733
This commit is contained in:
parent
10ca296d82
commit
55f4987f42
|
@ -201,6 +201,7 @@ rec {
|
|||
# Return a list or an empty list, dependening on a boolean value.
|
||||
optionals = cond: elems: if cond then elems else [];
|
||||
|
||||
optionalString = cond: string: if cond then string else "";
|
||||
|
||||
# Return a list of integers from `first' up to and including `last'.
|
||||
range = first: last:
|
||||
|
|
Loading…
Reference in a new issue