I suppose it might help sometimes when designing an abstraction, to guide you to some nice properties, such as easy composition.
I suppose it might help sometimes when designing an abstraction, to guide you to some nice properties, such as easy composition.
So, in addition to being able to raise numbers to powers I could also use it on matrices whose elements belonged to a semiring.
That is, I could use the same code on a matrix of doubles with "times" and "plus" (for the Markov chains), as well as a matrix of booleans with "and" and "or" (for the graph connectivity).
(Of course, I could have used special purpose libraries, but these were small problems and it was fun. :)
At least in Haskell one thing it means is you can use lots of new helper functions.
> guide you to some nice properties, such as easy composition.
Yep, which gets you code re-use for one.