
That must be my problem. Thanks for the info. On Mon, Apr 5, 2021 at 12:36 PM Tom Ellis < tom-lists-haskell-cafe-2017@jaguarpaw.co.uk> wrote:
On Mon, Apr 05, 2021 at 12:17:23AM -0500, Galaxy Being wrote:
I'm just not understanding the concept of a functor in this context: I have this [...] It seems there should be just one plus, function that would handle both an Int-based Peano and the MyNum-based Peano, not two. But in this definition
fmap :: (a -> b) -> f a -> f b
The (a -> b) should be "lifted" over the f a -> f b But I can't conceive of how this should all fit together
Are you perhaps confusing the ML notion of "functor" with the Haskell notion of "Functor" (which is just a particular typeclass)?
In fact, Haskell's type classes as a whole are probably closer to ML's "functors" than Haskell's "Functor"s are!
Tom _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.