etamoo

Safe HaskellNone
LanguageHaskell2010

MOO.List

Contents

Description

Abstract MOO list type

Synopsis

Documentation

Accessors

Length information

Indexing

Extracting sublists (slicing)

Construction

Initialization

Concatenation

Elementwise operations

Monadic mapping

forM_ :: Monad m => MOOList -> (Value -> m b) -> m () Source

Working with predicates

Searching

Folding

Monadic folds

foldM :: Monad m => (a -> Value -> m a) -> a -> MOOList -> m a Source

Conversions

Lists

MOO primitives

Association list interface

assocLens :: StrT -> MOOList -> Maybe (Maybe Value, Maybe Value -> MOOList) Source

Return the current value (if any) associated with the given key, and a function to associate the key with a new value (or remove it). Returns Nothing if the list is not a proper association list.

Convenience functions

set :: MOOList -> Value -> Int -> MOOList Source

Return a modified list with the given 0-based index replaced with the given value.

insert :: MOOList -> Int -> Value -> MOOList Source

Return a modified list with the given value inserted at the given 0-based index.

delete :: MOOList -> Int -> MOOList Source

Return a modified list with the value at the given 0-based index removed.