Data.List.PointedList.Circular
- module Data.List.PointedList
- next :: PointedList a -> PointedList a
- previous :: PointedList a -> PointedList a
- delete :: PointedList a -> Maybe (PointedList a)
- deleteLeft :: PointedList a -> Maybe (PointedList a)
- deleteRight :: PointedList a -> Maybe (PointedList a)
Documentation
module Data.List.PointedList
next :: PointedList a -> PointedList aSource
Move the focus to the next element in the list. If the last element is currently focused, loop to the first element.
previous :: PointedList a -> PointedList aSource
Move the focus to the previous element in the list. If the first element is currently focused, loop to the last element.
delete :: PointedList a -> Maybe (PointedList a)Source
An alias of deleteRight
.
deleteLeft :: PointedList a -> Maybe (PointedList a)Source
Possibly delete the element at the focus, then move the element on the
left to the focus. If no element is on the left, focus on the element to
the right. If the deletion will cause the list to be empty, return
Nothing
.
deleteRight :: PointedList a -> Maybe (PointedList a)Source
Possibly delete the element at the focus, then move the element on the
right to the focus. If no element is on the right, focus on the element to
the left. If the deletion will cause the list to be empty, return
Nothing
.