Old thread, but still works great, thanks!

Den onsdag den 28. april 2010 03.25.26 UTC+2 skrev ataggart:
>
> Inspired from an earlier discussion, I've written a macro that allows 
> let-style binding values to be try'd, and still available to catch/ 
> finally clauses.  E.g.: 
>
> (try-let [from (API/open from-addr) to (API/open to-addr)] 
>   (do-stuff from to) 
>   (finally 
>     (if to (doto to .flush .close)) 
>     (if from (.close from)))) 
>
> (Setting aside the fact that the above example would probably be 
> better implemented using with-open) 
>
> Source:  http://gist.github.com/377278 
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "Clojure" group. 
> To post to this group, send email to clo...@googlegroups.com <javascript:> 
> Note that posts from new members are moderated - please be patient with 
> your first post. 
> To unsubscribe from this group, send email to 
> clojure+u...@googlegroups.com <javascript:> 
> For more options, visit this group at 
> http://groups.google.com/group/clojure?hl=en

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to