modify package:brick
Monadic state transformer.
Maps an old state to a new state inside a state monad. The old state
is thrown away.
Main> :t modify ((+1) :: Int -> Int)
modify (...) :: (MonadState Int a) => a ()
This says that
modify (+1) acts over any Monad that is a
member of the
MonadState class, with an
Int state.
Update the attribute map while rendering the specified widget: set the
map's default attribute to the one that we get by applying the
specified function to the current map's default attribute. This is a
variant of
withDefAttr; see the latter for more information.
Modify the internal circular list structure of a focus ring directly.
This function permits modification of the circular list using the rich
Data.CircularList API.
Apply a function to the selected element. If no element is selected
the list is not modified.
Complexity: same as
traverse for the container type (typically
O(n)).
Complexity: same as
listSelectedElementL for the list's
container type.
listModify for List: O(n)
listModify for Seq: O(log(min(i, n - i)))