An implementation of common lisp's return-from for clojure. Just a
small little hack, but it really bugged me when I needed it and it
wasn't there.

https://github.com/jpalmucci/clj-return-from

>From the README:

# clj-return-from

An implementation of common lisp's return-from for clojure

## Usage

The 'block' macro will establish a block with lexical scope. In this
lexical scope, a return-from-<blockname> macro can be used to
immediately exit the block with some return value.

EX:

(block foo
       (+ 1 2))

==> 3

(block foo
       (return-from-foo :bar)
       (+ 1 2))

==> :bar

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to