Skip to content

Instantly share code, notes, and snippets.

@yokolet
Last active August 29, 2015 13:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save yokolet/9927616 to your computer and use it in GitHub Desktop.
sample of function with let for ClojureBridge CommunityDocs
(defn right-triangle? [coll]
(let [a-square (* (nth coll 0) (nth coll 0))
b-square (* (nth coll 1) (nth coll 1))
c-square (* (nth coll 2) (nth coll 2))]
(= (+ a-square b-square) c-square)))
(right-triangle? [1 2 3])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment