feat(utils): add generic FUNCTIONALIZE to turn values into functions

This commit is contained in:
Edward
2020-12-30 22:03:56 -08:00
parent 1310d70f9c
commit 07b0c02806
3 changed files with 21 additions and 3 deletions

View File

@ -11,7 +11,9 @@
(:method ((seq sequence) (func symbol) init)
(reduce func seq :initial-value init))
(:method (seq (func symbol) init)
(reduce-generic seq (symbol-function func) init))
(reduce-generic seq
(symbol-function func)
init))
(:method ((seq hash-table) (func function) init)
(let ((acc init))
(maphash (lambda (k v)