by ngruhn · 1y ago · 0 comments
{
slides: List<Slide>,
current_index: Int
}
Or alternatively: {
left_slides: List<Slide>,
current: Slide,
right_slides: List<Slide>
}
Is it fair to call the latter a Zipper? {
slides_shown: List<Slide>,
slides_left: List<Slide>
}
Where the head of slides_left is the current slide.
Pretty much any recursive data structure can be derived into a zipper.