Hacker News new | ask | show | jobs
by M1573RMU74710N 5419 days ago
Sorry, my comment should read:

"""

    ( do (x) -> whatever x ) for x in foobar
or

    foo  = (x) -> whatever x
    foo x for x in foobar
or

    for x in foobar
        do (x) -> whatever x
I find all of these pretty readable and easy. The former in simple cases like "whatever x", and the latter two when you are doing more than just "whatever x".

I think it's important to distinguish cases like this and that the syntax is clean enough without adding some helper that makes what's going on implicit

"""

In the section where it says:

""" do ( -> whatever x ) for x in foobar """