Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll preface: this is more of an interesting connection, rather than a direct answer to your question.

Zippers can be seen as (or at least isomorphic to) the derivative of a type with respect to one of its type parameters. This is described in Conor McBride's paper "The Derivative of a Regular Type is its Type of One-Hole Contexts."

http://strictlypositive.org/diff.pdf

If a video is more your speed, Kenneth Foner gave a great talk titled "`choose` your own derivative" that takes the concept of derivatives of types and takes it a step further. You can skip to the 11 minute mark to watch his explanation of zippers as derivatives here:

https://www.youtube.com/watch?v=79zzgL75K8Q&t=11m

With that said, the standard go-to paper for Zippers would probably be "The Zipper" by Gerard Huet:

http://gallium.inria.fr/~huet/PUBLIC/zip.pdf



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: