A library for a template type.
Note: If all zipper elements are of the same type, use Zipper.ListList instead. It has a simpler API.
Zipper.ListListZipper.StringStringCreate a new Zipper
Attempt to move split to right
Attempt to move split to left
Attempt to move split to right, return unchanged zipper on failure
Attempt to move split to left, return unchanged zipper on failure
Attempt to move the split by specifying the length of the resulting left list. If the split would be invalid, eg n < 0 or n > length zipper, returns Nothing.
( [ 2, 1 ], [ 3, 4 ] )
|> moveToN identity identity -1
== Nothing
( [ 2, 1 ], [ 3, 4 ] )
|> moveToN identity identity 1
== Just ( [ 1 ], [ 2, 3, 4 ] )
( [ 2, 1 ], [ 3, 4 ] )
|> moveToN identity identity 4
== Just ( [ 4, 3, 2, 1 ], [] )
A list type that must contain at least one element