2 ms·
There was a talk a few years back by Conal Elliott about a concise implementation of reverse mode automatic differentiation through tweaking the definition of d
by ndriscoll 4y ago
There was a talk a few years back by Conal Elliott about a concise implementation of reverse mode automatic differentiation through tweaking the definition of derivative to make it composable and then dualizing[0].
There was another talk where IIRC Edward Kmett dualizes divide and conquer algorithms to derive a generic bucket sort that works on general algebraic data types[1].
These are generic concepts. Haskell is just convenient to express them in. In some sense, obeying functor or monad laws just means you'll have a "clean", predictable design, for example. The language doesn't need special support; you just need to check whether your code is composable in a sensible way.
[0] https://youtube.com/watch?v=17gfCTnw6uE https://youtube.com/watch?v=17gfCTnw6uE
[1] https://youtube.com/watch?v=eXDJ5Jcbgk8 https://youtube.com/watch?v=eXDJ5Jcbgk8
- jiggawatts 4y agoHeh... I just realised I've already seen that presentation!