Hi,
just to throw it out there. As far as I understand this, we want to be
able to return based on the value of computed by a function without
having to assign the value to a variable first.
Another potentially more powerful alternative would be if we could
return the method from inside a closure
Hi mg,
I like your idea, but it's hard for IDE to infer the type of `it` during
we coding.
```
returnIf(a > 6 && it > 10) { goo() }
```
Cheers,
Daniel Sun
On 2020/07/29 20:28:13, MG wrote:
> Hi Daniel,
>
> good idea also :-)
>
> If the arguments are in this order however, it looks like
Hi Daniel,
good idea also :-)
If the arguments are in this order however, it looks like a regular if
with its execution block to me...
Having the method call as the second argument would express more
intuitively what is happening - so maybe one should flip the order of
the arguments, and use: