Last active
March 1, 2020 13:07
Revisions
-
xhh revised this gist
Mar 1, 2020 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,8 @@ (defmacro comp* "The left-to-right version of comp. Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the leftmost of fns to the args, the next fn (left-to-right) to the result, etc." [& fns] `(comp ~@(reverse fns))) -
xhh created this gist
Mar 1, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ (defmacro comp* [& fns] `(comp ~@(reverse fns)))