Skip to content

Instantly share code, notes, and snippets.

@edoloughlin
Created December 31, 2010 16:17
Show Gist options
  • Select an option

  • Save edoloughlin/761119 to your computer and use it in GitHub Desktop.

Select an option

Save edoloughlin/761119 to your computer and use it in GitHub Desktop.
if-let treating nil as true?
; I've got
(if-let [session (last (find @*sessions* session-token))]
(something) (something-else))
; The (last (find @*sessions* session-token)) expression evaluates
; to nil but (something) is then evaluated when I would expect
; that (something-else) should be evaluated. What gives?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment