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

Language | Haskell2010 |

## Synopsis

- data By6Bits e
- empty :: By6Bits e
- singleton :: Int -> e -> By6Bits e
- maybeList :: [Maybe e] -> By6Bits e
- pair :: Int -> e -> Int -> e -> By6Bits e
- insert :: Int -> e -> By6Bits e -> By6Bits e
- replace :: Int -> e -> By6Bits e -> By6Bits e
- adjust :: (e -> e) -> Int -> By6Bits e -> By6Bits e
- unset :: Int -> By6Bits e -> By6Bits e
- lookup :: Int -> By6Bits e -> Maybe e
- focusAt :: Monad m => Focus a m b -> Int -> By6Bits a -> m (b, By6Bits a)
- toMaybeList :: By6Bits e -> [Maybe e]
- toIndexedList :: By6Bits e -> [(Int, e)]
- elementsUnfoldl :: By6Bits e -> Unfoldl e
- elementsUnfoldlM :: Monad m => By6Bits a -> UnfoldlM m a
- elementsListT :: By6Bits a -> ListT STM a
- onElementAtFocus :: Monad m => Int -> Focus a m b -> Focus (By6Bits a) m b
- null :: By6Bits a -> Bool

# Documentation

An immutable space-efficient sparse array, which can only store not more than 64 elements.

#### Instances

Foldable By6Bits Source # | |

Defined in PrimitiveExtras.By6Bits fold :: Monoid m => By6Bits m -> m Source # foldMap :: Monoid m => (a -> m) -> By6Bits a -> m Source # foldMap' :: Monoid m => (a -> m) -> By6Bits a -> m Source # foldr :: (a -> b -> b) -> b -> By6Bits a -> b Source # foldr' :: (a -> b -> b) -> b -> By6Bits a -> b Source # foldl :: (b -> a -> b) -> b -> By6Bits a -> b Source # foldl' :: (b -> a -> b) -> b -> By6Bits a -> b Source # foldr1 :: (a -> a -> a) -> By6Bits a -> a Source # foldl1 :: (a -> a -> a) -> By6Bits a -> a Source # toList :: By6Bits a -> [a] Source # null :: By6Bits a -> Bool Source # length :: By6Bits a -> Int Source # elem :: Eq a => a -> By6Bits a -> Bool Source # maximum :: Ord a => By6Bits a -> a Source # minimum :: Ord a => By6Bits a -> a Source # | |

Eq a => Eq (By6Bits a) Source # | |

Show a => Show (By6Bits a) Source # | |

insert :: Int -> e -> By6Bits e -> By6Bits e Source #

Insert an element value at the index. It's your obligation to ensure that the index is empty before the operation.

toMaybeList :: By6Bits e -> [Maybe e] Source #

Convert into a list representation.

toIndexedList :: By6Bits e -> [(Int, e)] Source #

elementsUnfoldl :: By6Bits e -> Unfoldl e Source #

# Orphan instances

Foldable By6Bits Source # | |

fold :: Monoid m => By6Bits m -> m Source # foldMap :: Monoid m => (a -> m) -> By6Bits a -> m Source # foldMap' :: Monoid m => (a -> m) -> By6Bits a -> m Source # foldr :: (a -> b -> b) -> b -> By6Bits a -> b Source # foldr' :: (a -> b -> b) -> b -> By6Bits a -> b Source # foldl :: (b -> a -> b) -> b -> By6Bits a -> b Source # foldl' :: (b -> a -> b) -> b -> By6Bits a -> b Source # foldr1 :: (a -> a -> a) -> By6Bits a -> a Source # foldl1 :: (a -> a -> a) -> By6Bits a -> a Source # toList :: By6Bits a -> [a] Source # null :: By6Bits a -> Bool Source # length :: By6Bits a -> Int Source # elem :: Eq a => a -> By6Bits a -> Bool Source # maximum :: Ord a => By6Bits a -> a Source # minimum :: Ord a => By6Bits a -> a Source # | |

Eq a => Eq (By6Bits a) Source # | |

Show a => Show (By6Bits a) Source # | |