What good is Control.Category?
Control.Category
is just the ground work for Control.Arrow
, and that's where you get the fun functions from.
Do I get anything fun besides overloading id and (.) ?
Well, you also (should) get the laws associated with them:
"identity/left" forall p .
id . p = p
"identity/right" forall p .
p . id = p
"association" forall p q r .
(p . q) . r = p . (q . r)
As a side note:
The reason that you don't get that many fun functions like mapM
or foldMap
is, that saying something is a category is actually saying very little about it. The most useful functions I guess are the ones defined in Control.Category
, which sometimes make code easier to read: >>>
and <<<