|
|
|
|
|
by cousin_it
2389 days ago
|
|
> we can think of a monad as a datatype with Aaaaaaa Be more precise about instance relations! They are the first source of confusion! - String is a type. The value "abcde" is an instance of that type. - Num is a typeclass. The type Int is an instance of that typeclass. The value 12345 is an instance of that type. - Monad is a typeclass whose instances are generic types. The generic type List is an instance of that typeclass. The type List Int is an instance of that generic type. The value [1,2,3] is an instance of that type. Explaining the operations of Monad is only useful when you're comfortable with "value belongs to type which belongs to generic type which belongs to typeclass". |
|