Zippers, Comonads and Data Structures in Scala
YOW! Lambda Jam 2013
The term zipper is a colloquial used to describe n-hole (most often, 1-hole) contexts. That is, a data structure that has a hole or pointer focused on a specific element with the ability to efficiently traverse to its neighbouring elements, providing an elegant solution for the need to efficiently traverse and modify immutable data structures. Comonads, the categorical dual of Monads, provide an abstraction for dealing with types that allow extraction. That is, the ability to take a value out of a context; for example, the fact that it is a total operation to extract the head of a non-empty list.
In this talk, we will dive into the implementation of purely-functional data structures in Scala. Exploring zippers, Comonads, and their relationship.
Mark Hibberd spends his time working on scenario planning and sustainability problems for Kinesis. Mark takes software development seriously. Valuing correctness and reliability, he is constantly looking to learn tools and techniques to support these goals. This approach has led to a history of building teams that utilise purely-functional programming techniques to help deliver robust products.