Common Lisp has return-from
; is there any sort of return
in Clojure for when you want to return early from a function?
There isn't a return statement in Clojure. Even if you choose not to execute some code using a flow construct such as if
or when
, the function will always return something, in these cases nil
. The only way out is to throw an exception, but even then it will either bubble all the way up and kill your thread, or be caught by a function - which will return a value.