A Zipper implementation for Lists
inspired by
https://hackage.haskell.org/package/ListZipper-1.2.0.2/docs/src/Data-List-Zipper.html
convert this Zipper to a list
toList $ fromList[1,2,3,4,5]
checks whether the cursor is at the start of the Zipper
startp $ fromList [1,2,3,4,5]
move the cursor to the start of the Zipper
show $ start $ fromList [1,2,3,4,5]
moves the cursor to the right or leaves the cursor unchanged
show $ right $ fromList [1,2,3,4,5]
remove an element from the zipper
show $ replace 9 $ fromList[1,2,3,4,5]
push an element into the Zipper and move the cursor past it
show $ push 0 $ fromList [1,2,3,4,5]
pop an element from the Zipper
show $ pop $ right $ fromList [1,2,3,4,5]
moves the cursor to the left or leaves the cursor unchanged
show $ left $ fromList [1,2,3,4,5]
checks whether this Zipper is empty
isEmpty empty {a = Nat}
inserts an element at the current cursor
show $ insert 0 $ fromList [1,2,3,4,5]
Return the index of the current cursor
index $ fromList [1,2,3,4,5]
creates a Zipper from a List
show $ fromList [1,2,3,4,5]
checks whether the cursor is at the end of the Zipper
endp $ fromList [1,2,3,4,5]
move the cursor to the end of the Zipper
show $ end $ fromList [1,2,3,4,5]
creates an empty Zipper
empty {a = Nat}
delete the element at the current cursor
show $ Data.List.Zipper.delete $ fromList [1,2,3,4,5]
gets the element at the current cursor
cursor $ fromList [1,2,3,4,5]
A Zipper for Lists