Skip to content

Instantly share code, notes, and snippets.

@noidi
Created March 25, 2010 16:58
Show Gist options
  • Save noidi/343818 to your computer and use it in GitHub Desktop.
Save noidi/343818 to your computer and use it in GitHub Desktop.
(defn nil-or-last [[x & xs]]
(if xs
(if (nil? x)
nil
(recur xs))
x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment