Skip to content

Instantly share code, notes, and snippets.

Created November 20, 2008 00:52
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 anonymous/26862 to your computer and use it in GitHub Desktop.
Save anonymous/26862 to your computer and use it in GitHub Desktop.
user> (defn confused [nums]
(let [sorted (sort nums)
smallest (first sorted)
smallest-first (if (= smallest (first nums))
true)]
(println smallest-first)))
#=(var user/confused)
user> (confused '(3 2 1))
nil
nil
user> (confused [3 2 1])
true
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment