I'm trying to make a pointfree function f
that can act like APL's dyadic forks/Husk's §
, so f g h i a b
equals g (h a) (i b)
, where g
is a binary function, h
and i
are unary functions, and a
and b
are integers (I'm only dealing with integers and not other types right now). I converted the function to pointfree in the following steps, but it's 26 bytes with a lot of parentheses and periods and even a flip
, so I'd like to know how to golf it.
f g h i a b=g(h a)(i b)
f g h i=(.i).g.h
f g h=(.g.h).(.)
f g=(.(.)).(flip(.)).(g.)
f=((.(.)).).((flip(.)).).(.)
((flip.((.).)).).(.)
. \$\endgroup\$