Closed MatthijsBlom closed 10 months ago
The original hint could perhaps be generalized to f <$> g ↦ f . g, but I could not figure out how to express that g should be a function.
You almost certainly can't in the general case, because hlint
only does parsing, no typechecking.
Thanks!
<$>
associates to the left, sof <$> g <$> x
is equivalent tof . g <$> x
not because of a Functor law, but because for functions(<$>) == (.)
.The actual Functor law was missing, so I added it.
The original hint could perhaps be generalized to
f <$> g
↦f . g
, but I could not figure out how to express thatg
should be a function.