kb
18.11.2012 18:45
When we make a type, we think about which behaviors it supports, i.e. what it can act like and then based on that we decide which type classes to make it an instance of. If it makes sense for values of our type to be equated, we make it an instance of the Eq type class. If we see that our type is some kind of functor, we make it an instance of Functor, and so on.
ппц тонко я пошутил
да, как я примерно
алсо, оказывается правильный путь складывать числа в х-ле — это
getSum $ Sum 2 `mappend` Sum 9