diff options
author | colin <colin@cicadas.surf> | 2023-02-28 20:14:57 -0800 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-02-28 20:14:57 -0800 |
commit | b4c1525e4c93e8e277e9484a4ae3669007e86712 (patch) | |
tree | 305a1620105568fdf0d09289fb34c5cfcc6549fe /hofs.lisp | |
parent | bfddf4064215fb5cd22a1d54c7f4616e82256214 (diff) |
add mapped
Diffstat (limited to 'hofs.lisp')
-rw-r--r-- | hofs.lisp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -21,3 +21,9 @@ PRED, THEN, and ELSE are assumed to accept the same arguments." when (apply pred args) return (apply fn args)))) +(defun mapped (fn1 &rest fns) + "Return a function the arguments of which are applied to (FN1 . FNS), +returning a list of return values." + (lambda (&rest args) + (loop :for fn :in (cons fn1 fns) + :collect (apply fn args)))) |