coreygirard/elm-zipper/1.0.0

Zipper.ListListList.Advanced

A zipper with a list of selected elements.

Note: If all zipper elements are of the same type, use Zipper.ListListList instead. It has a simpler API.

Definition

type alias Zipper a b c =
( List a, List b, List c )

A list type that must contain at least one element

Create

empty : Zipper a b c

Create a new Zipper

make "hello" == ( "hello", "hello" )

From/to other Zippers

fromZipperListList : List b -> Zipper a c -> Zipper a b c

Set selection to last element

toZipperListList : Zipper a b c -> Zipper a c

Set selection to last element

fromZipperListElemList : (b1 -> List b2) -> Zipper a b1 c -> Zipper a b2 c

Set selection to last element

toZipperListElemList : (List b1 -> b2) -> Zipper a b1 c -> Zipper a b2 c

Set selection to last element

Get

getLeft : Zipper a b c -> List a

Set selection to last element

Move

moveLeftToLeft : (a -> b) -> Zipper a b c -> Maybe (Zipper a b c)
(a -> b)
-> (List a -> List b -> List c -> Bool)
-> Zipper a b c
-> Maybe (Zipper a b c)
moveLeftToRight : (a -> b) -> Zipper a b c -> Maybe (Zipper a b c)
(a -> b)
-> (List a -> List b -> List c -> Bool)
-> Zipper a b c
-> Maybe (Zipper a b c)
moveRightToLeft : (a -> b) -> Zipper a b c -> Maybe (Zipper a b c)
(a -> b)
-> (List a -> List b -> List c -> Bool)
-> Zipper a b c
-> Maybe (Zipper a b c)
moveRightToRight : (a -> b) -> Zipper a b c -> Maybe (Zipper a b c)
(a -> b)
-> (List a -> List b -> List c -> Bool)
-> Zipper a b c
-> Maybe (Zipper a b c)
(a -> b)
-> (b -> a)
-> (b -> c)
-> (c -> b)
-> Int
-> Int
-> Zipper a b c
-> Maybe (Zipper a b c)