kirancodes.me
To Proof Maintenance & Beyond!

Clowns to the left of me, jokers to the right (pearl): dissecting data structures

Conor McBride

Abstract

This paper introduces a small but useful generalisation to the 'derivative' operation on datatypes underlying Huet's notion of 'zipper', giving a concrete representation to one-hole contexts in data which is undergoing transformation. This operator, 'dissection', turns a container-like functor into a bifunctor representing a one-hole context in which elements to the left of the hole are distinguished in type from elements to its right.

Related papers