4 ms·
Great answer, but on a pedantic note, it's not quite true that the derivative of a data type is its zipper. The derivative is the one-hole context, but the zip
by kvb 12y ago
Great answer, but on a pedantic note, it's not quite true that the derivative of a data type is its zipper. The derivative is the one-hole context, but the zipper is more like a one-substructure context instead. There's a bit more elaboration here: [1].
[1] http://en.wikibooks.org/wiki/Haskell/Zippers http://en.wikibooks.org/wiki/Haskell/Zippers
- tel 12y agoTrue, I should have been more precise. The zipper just is a technique for using one-hole contexts to make a path as you drill through a recursive type.