Conor McBride, The Derivative of a Regular Type is its Type of One-Hole Contexts
http://strictlypositive.org/diff.pdf
related to Huet's Zipper and Hinze, Paterson Finger Trees, with a huge of follow-on literature:
https://personal.cis.strath.ac.uk/conor.mcbride/Holes.pdf
https://conal.net/blog/posts/differentiation-of-higher-order...
and numerous old posts by sigfpe (Dan Piponi), e.g.
http://blog.sigfpe.com/2008/06/blessed-mans-formula-for-hole...
Conor McBride, The Derivative of a Regular Type is its Type of One-Hole Contexts
http://strictlypositive.org/diff.pdf
related to Huet's Zipper and Hinze, Paterson Finger Trees, with a huge of follow-on literature:
https://personal.cis.strath.ac.uk/conor.mcbride/Holes.pdf
https://conal.net/blog/posts/differentiation-of-higher-order...
and numerous old posts by sigfpe (Dan Piponi), e.g.
http://blog.sigfpe.com/2008/06/blessed-mans-formula-for-hole...