Skip to content

Instantly share code, notes, and snippets.

@fffej
Created August 7, 2009 22:52
Show Gist options
  • Save fffej/164215 to your computer and use it in GitHub Desktop.
Save fffej/164215 to your computer and use it in GitHub Desktop.
(defn a
[k x1 x2 x3 x4 x5]
(letfn [(b []
(reset! k (dec @k))
(a (atom @k) b x1 x2 x3 x4))]
(if (<= @k 0)
(+ (x4) (x5))
(b))))
(defn man-or-boy
[x]
(a (atom x)
(fn [] 1)
(fn [] -1)
(fn [] -1)
(fn [] 1)
(fn [] 0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment