Ah, I thought there was a contrib out there for unwind-protect . I guess its so trivial that no one wrote it. lol.
On Sep 15, 12:25 pm, Joost <jo...@zeekat.nl> wrote: > On 15 sep, 18:19, Jarkko Oranen <chous...@gmail.com> 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 clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---