mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 14:51:37 -05:00
✨ Add arity-1 to d/nilv that returns a transducer
This commit is contained in:
parent
d1e74b0da9
commit
ef27301238
1 changed files with 4 additions and 2 deletions
|
@ -580,8 +580,10 @@
|
|||
|
||||
(defn nilv
|
||||
"Returns a default value if the given value is nil"
|
||||
[v default]
|
||||
(if (some? v) v default))
|
||||
([default]
|
||||
(map #(nilv % default)))
|
||||
([v default]
|
||||
(if (some? v) v default)))
|
||||
|
||||
(defn num?
|
||||
"Checks if a value `val` is a number but not an Infinite or NaN"
|
||||
|
|
Loading…
Add table
Reference in a new issue