Guid75/ziplist/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

Formerly guid75/ziplist. Search finds this package by either name.

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

singleton : a -> ZipList a

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

forward : ZipList a -> ZipList a

Move forward a ZipList

backward : ZipList a -> ZipList a

Move backward a ZipList