Hacker Newsnew | comments | ask | jobs | submitlogin
ekidd 325 days ago | link | parent

The payoff is in part 3, here, where crntaylor explains how to take the derivative(!) of a type:

http://chris-taylor.github.io/blog/2013/02/13/the-algebra-of...

You can find a somewhat more mathematical explanation here, with explanations of why this is useful:

http://pavpanchekha.com/blog/zippers/derivative.html

The most obvious use for derivative types is the automated creation of "zipper" types for functional data structures. Among other uses, zipper types make certain purely functional data structures much more efficient. This is important both for Haskell and ML programmers, and also in situations where you need to leave older versions of a data structure intact, such as when implementing rollback or creating append-only file formats.




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: