Re: Simple lisp like idiom in clojure, call function and keep the result

2009-01-23 Thread Kevin Downey
there is when-let, if-let, etc, that combine conditionals and lexical binding On Fri, Jan 23, 2009 at 1:31 PM, BerlinBrown wrote: > > What is an idiom to call a function and also retain the result. For > example, I see myself doing this a lot, but it seems to more code than > would be needed. >

Simple lisp like idiom in clojure, call function and keep the result

2009-01-23 Thread BerlinBrown
What is an idiom to call a function and also retain the result. For example, I see myself doing this a lot, but it seems to more code than would be needed. (let [a (some-func)] (when a (println (a dosomething - I wish I could avoid having to use the 'let' in this case I guess in