For the infix function:
let fab = (a+10, b) f 4 5 => (14,5) 4 `f` 5 => (14,5)
Arguments can be inverted by specifying an auxiliary function:
let g = flip f 4 `g` 5 => (15,4)
Is it possible to do this inline?
4 `flip f` 5 => parse error on input `f' 4 `(flip f)` 5 => parse error on input `('
My use case is Control.Arrow.first
. Instead
(+10) `first` (7,8) (17,8)
I would prefer a solution for a forward application, for example
(7,8) `forwardFirst` (+10)
without the need to write
let forwardFirst = flip first
source share