On 15 sep, 18:19, Jarkko Oranen <[email protected]> wrote:
> Unwind-protect? Isn't that a Common Lisp thing? Sounds like you got
> the wrong mailing list :)
You may be right :)
> It's true though that Clojure has no return, break or continue... They
> are imperative constructs, and Clojure is mostly functional. As far as
> I know, the closest thing to unwind-protect is probably the finally
> clause of a try-catch-finally form, but I don't think there's any way
> to break out from inside a try block without executing the finally
> code.
(try (print "test\n\n") (.flush *out*) (System/exit 0)
(finally (print "finally\n\n") (.flush *out*)))
:)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---