Skip to content

Instantly share code, notes, and snippets.

@dawranliou
Created April 26, 2018 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dawranliou/f2d1621524a4e320062dc6675ab50302 to your computer and use it in GitHub Desktop.
Save dawranliou/f2d1621524a4e320062dc6675ab50302 to your computer and use it in GitHub Desktop.
(defn tri?
[n]
(= (last (take-while #(>= n %) tri-numbers)) n))
(tri? 10)
;; true
(tri? 11)
;; false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment