Conversation

TIL, #Haskell classes are _collection of_ types. They themselves are not types. It's a bit different from OO world, where classes _are_ types. In that sense, Functor is a collection of classes, it allows me to map from type `a` to type `b` in a particular class. 🤔 #TypeClasses
5
5
This Tweet was deleted by the Tweet author. Learn more
> writing a post Good news to me. 🤓 > type classes as a function from type to set of operations. Oh okay. It means, kinda, an `Eq` is a function from type `a` to {(==), (/=)}. {..} as in set notation. 🤔
1
1
> a type class is a function type Yeah, that's another cool representation. IMO, when _types_ are first-class, some things make more sense, as in this case. Thanks Brendan. > I'm expecting that to be 'fun'. Was that a pun? 🙂
1
Show replies