Open ianliu opened 3 years ago
Yes, those are equivalent as far as I can tell.
Yes and a lot clearer, this part of the Applicative
docs becomes relevant
As a consequence of these laws, the
Functor
instance for f will satisfyfmap f x = pure f <*> x
Is it possible to simplify the following two lines
https://github.com/ekmett/free/blob/a06c37ff51cc6e1a008b5d6e5f5c13c80edc67a0/src/Control/Monad/Free.hs#L222-L223
to this?
I'm still learning Haskell and I was trying to implement the Free monad myself and came here to compare my implementation with yours; so I apologize in advance if this "issue" is just plain bogus.
Thanks, Ian