Skip to content

Instantly share code, notes, and snippets.

/gist:1085679
Created Jul 15, 2011

Embed
What would you like to do?
(defn generate-map
;;default remapping to inner function call
([xmax ymax] (generate-map xmax ymax xmax ymax {}))
;;default inner function call
([xmax ymax xcur ycur worldmap]
(if (and (zero? ycur) (zero? xcur)) worldmap)
(if (zero? xcur)
(recur xmax ymax xmax (dec ycur) (worldmap-add worldmap xcur ycur))
(recur xmax ymax (dec xcur) ycur (worldmap-add worldmap xcur ycur)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.