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.
>
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