Trying to understand haskell's code
Here is a Haskell code which compiles:
class Category categ where
method1 :: categ a a
method2 :: categ a b -> categ b c -> categ a c
But I don't understand its meaning:
what's categ? how can it be defined: through data or class? maybe this is
a function?
what are a and b and c? since they are not specified as
class Category categ a b c where
method1 :: categ a a
method2 :: categ a b -> categ b c -> categ a c
this code shouldn't compile, should it?
No comments:
Post a Comment