guid75/ziplist/1.0.2

ZipList

A ZipList is a collection which can be moved forward/backward and that exposes a single current element

ZipLists

type ZipList a

A collection data type that can be moved forward/backward and that exposes a current element (see the current function)

Creation

fromList : List a -> ZipList a

Craft a new ZipList out of a List

Create a new ZipList with a single element in it

Consultation

current : ZipList a -> Maybe a

Return the current element of a ZipList. Nothing will be returned if the ziplist is empty

toList : ZipList a -> List a

Convert a ZipList into a List

length : ZipList a -> Int

Return a ZipList length

Moving

Move forward a ZipList

Move backward a ZipList