mirror of
https://github.com/penpot/penpot.git
synced 2026-03-09 19:56:05 +00:00
✨ Add arity-1 to d/nilv that returns a transducer
This commit is contained in:
committed by
Alejandro Alonso
parent
d1e74b0da9
commit
ef27301238
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user