buchhaltung-0.0.5: Automates most of your plain text accounting data entry in ledger format.

Safe HaskellSafe
LanguageHaskell2010

Buchhaltung.Zipper

Synopsis

Documentation

data Zipper a Source #

Nonemtpy zipper

Constructors

LZ 

Fields

Instances

Functor Zipper Source # 

Methods

fmap :: (a -> b) -> Zipper a -> Zipper b #

(<$) :: a -> Zipper b -> Zipper a #

integrate' :: Zipper a -> E.NonEmpty a Source #

Re-constitute a list from a zipper context.

integrate :: Zipper a -> [a] Source #

differentiate :: E.NonEmpty a -> Zipper a Source #

Turn a list into a context with the focus on the first element.

back :: Zipper a -> Zipper a Source #

Move the focus to the previous element. Do nothing if the focus | is already on the first element.

fwd :: Zipper a -> Zipper a Source #

Move the focus to the next element. Do nothing if the focus is | already on the last element.

modifyPresent :: (a -> a) -> Zipper a -> Zipper a Source #

Apply the given function to the currently focused element to | produce a new currently focused element.

modifyBack :: ([a] -> [a]) -> Zipper a -> Zipper a Source #

Apply the given function to all elements preceding the focus.

modifyFwd :: ([a] -> [a]) -> Zipper a -> Zipper a Source #

Apply the given function to all elements after the focus.

delete :: Zipper a -> Zipper a Source #

Delete the currently focused element. If there are no future elements move the focus to the next last element.

insback :: a -> Zipper a -> Zipper a Source #

Insert a new element just before the current focus, then move the | focus to the newly inserted element.

insfwd :: a -> Zipper a -> Zipper a Source #

Insert a new element just after the current focus, then move the | focus to the newly inserted element.