Add arity-1 to d/nilv that returns a transducer

This commit is contained in:
Andrey Antukh
2023-05-15 09:20:32 +02:00
committed by Alejandro Alonso
parent d1e74b0da9
commit ef27301238

View File

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