3
0
Fork 0
forked from mirrors/nixpkgs

Added optionalString (similar to optional)

svn path=/nixpkgs/trunk/; revision=11733
This commit is contained in:
Michael Raskin 2008-04-27 23:17:24 +00:00
parent 10ca296d82
commit 55f4987f42

View file

@ -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: