3 ms·
I wish the pointfree utility would use slightly higher-level combinators like those from Control.Arrow. Readable point-free code tends to break things up into m
by evincarofautumn 10y ago
I wish the pointfree utility would use slightly higher-level combinators like those from Control.Arrow. Readable point-free code tends to break things up into many small reusable pieces, following the maxim of “name code, not data”.
This example is totally absurd, since you’d just write “(f x, g y)” and call it a day, but you can extract a fully point-free version that’s somewhat readable.
f = pairwise $ curry $ apply *** apply
where
pairwise = fcurry fcurry
fcurry = fmap curry
apply = uncurry ($)