| ▲ | emih 7 hours ago | |||||||
You can still do this though:
Or if you prefer left-to-right:
Maybe what isn't clear is that this hole operator would bind to the innermost function call, not the whole statement. | ||||||||
| ▲ | twic 6 hours ago | parent | next [-] | |||||||
Even better, this method lets you pipeline into a parameter which isn't the last one: | ||||||||
| ||||||||
| ▲ | Smaug123 4 hours ago | parent | prev | next [-] | |||||||
This is essentially how Mathematica does it: the sugar `Foo[x,#,z]&` is semantically the same as `Function[{y}, Foo[x,y,z]]`. The `&` syntax essentially controls what hole belongs where. | ||||||||
| ▲ | raincole 6 hours ago | parent | prev [-] | |||||||
Wow, this convinced me. It's so obviously the right approach when you put it this way. | ||||||||