Created
November 7, 2013 22:49
-
-
Save anonymous/7363231 to your computer and use it in GitHub Desktop.
This file contains 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 characters
(defn smap [state func coll] | |
(loop [state state | |
ans '() | |
coll coll] | |
(if (empty? coll) | |
(reverse ans) | |
(let [[ns v] (func state (first coll))] | |
(recur ns | |
(cons v ans) | |
(rest coll)))))) |
timmc
commented
Nov 7, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment