Skip to content

Instantly share code, notes, and snippets.

@KirinDave
Created May 17, 2010 21:46
Show Gist options
  • Select an option

  • Save KirinDave/404271 to your computer and use it in GitHub Desktop.

Select an option

Save KirinDave/404271 to your computer and use it in GitHub Desktop.
; He's asking why this isn't tail recursive.
(def date-seq
(fn [d1 d2]
(loop [b (-> d1
(.dayOfMonth)
(.withMinimumValue))
e d2]
(cons b (if (time/before? b e)
(recur (.plusMonths b 1) e))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment