Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Created July 21, 2014 15:37
Show Gist options
  • Save edipofederle/4c617724494439e39c39 to your computer and use it in GitHub Desktop.
Save edipofederle/4c617724494439e39c39 to your computer and use it in GitHub Desktop.
(use '[clojure.core.match :only (match)])
(defn my-last [xs]
(match [(count xs)]
[1] (first xs)
:else (my-last (rest xs))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment