@dnalot makes an interesting and compelling case for <| to apply a closure on the right hand side to a flipped binary function on the left hand side. (Technically the proposal would apply to any binary function and matching operand, but that’s the motivating case.)
For example, this would allow:
map <| { $0.description }
Partial application is of general utility, and flippedness in particular allows the closure to be applied to the appropriate argument of the map, since Swift takes block parameters in trailing position to enable trailing syntax, at the cost of ease of curried application.
@dnalot makes an interesting and compelling case for
<|
to apply a closure on the right hand side to a flipped binary function on the left hand side. (Technically the proposal would apply to any binary function and matching operand, but that’s the motivating case.)For example, this would allow:
Partial application is of general utility, and flippedness in particular allows the closure to be applied to the appropriate argument of the
map
, since Swift takes block parameters in trailing position to enable trailing syntax, at the cost of ease of curried application.