|
|
|
|
|
by packetlost
423 days ago
|
|
It's still not ambiguous. Your second example would be a syntax error (probably, if I was designing it at least) because you're missing the invocation parenthesis after the wrapped value: a |> (await f())()
which removes any sort of ambiguity. Your first example calls f() with a as its first argument while the second (after my fix) calls and awaits f() and then invokes that result with a as its first argument.For the last example, it would look like: a |> (await f())() | g()
assuming f() is still async and returns a function. g() must be a function, so the parenthesis have to be added. |
|