2 ms·
I recently heard "Category theory tells you which parts are easy" from a mathematician working with Haskell Monads. Repeatedly, this turns out to be true (confi
by qznc 14y ago
I recently heard "Category theory tells you which parts are easy" from a mathematician working with Haskell Monads. Repeatedly, this turns out to be true (confirmation bias?).
He generalized a algorithm by using an abstract data type (a Monad of course) instead of a specific number type. Now the algorithm can be applied e.g. to probability distributions as well. The category theory tells you about bind and lift. However, the hard part is generalizing the algorithm, because you have fewer assumptions now.
For another example, greatest common divisor is a simple algorithm for numbers. Try generalizing it so you could also use polynomials instead of integers.