Safe Haskell | None |
---|---|

Language | Haskell2010 |

Abstract MOO list type

- data MOOList
- length :: MOOList -> Int
- null :: MOOList -> Bool
- (!) :: MOOList -> Int -> Value
- head :: MOOList -> Value
- slice :: Int -> Int -> MOOList -> MOOList
- tail :: MOOList -> MOOList
- splitAt :: Int -> MOOList -> (MOOList, MOOList)
- empty :: MOOList
- snoc :: MOOList -> Value -> MOOList
- concat :: [MOOList] -> MOOList
- forM_ :: Monad m => MOOList -> (Value -> m b) -> m ()
- elem :: Value -> MOOList -> Bool
- findIndex :: (Value -> Bool) -> MOOList -> Maybe Int
- elemIndex :: Value -> MOOList -> Maybe Int
- foldM :: Monad m => (a -> Value -> m a) -> a -> MOOList -> m a
- toList :: MOOList -> [Value]
- fromList :: [Value] -> MOOList
- storageBytes :: MOOList -> Int
- equal :: MOOList -> MOOList -> Bool
- assocLens :: StrT -> MOOList -> Maybe (Maybe Value, Maybe Value -> MOOList)
- set :: MOOList -> Value -> Int -> MOOList
- insert :: MOOList -> Int -> Value -> MOOList
- delete :: MOOList -> Int -> MOOList

# Documentation

# Accessors

## Length information

## Indexing

## Extracting sublists (slicing)

# Construction

## Initialization

## Concatenation

# Elementwise operations

## Monadic mapping

# Working with predicates

## Searching

# Folding

## Monadic folds

# Conversions

## Lists

# MOO primitives

storageBytes :: MOOList -> Int Source

# 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.