comfort-array-0.2: Arrays where the index type is a function of the shape type

Safe HaskellNone
LanguageHaskell98

Data.Array.Comfort.Boxed

Documentation

data Array sh a Source #

Instances
C sh => Functor (Array sh) Source # 
Instance details

Defined in Data.Array.Comfort.Boxed.Internal

Methods

fmap :: (a -> b) -> Array sh a -> Array sh b #

(<$) :: a -> Array sh b -> Array sh a #

C sh => Foldable (Array sh) Source # 
Instance details

Defined in Data.Array.Comfort.Boxed.Internal

Methods

fold :: Monoid m => Array sh m -> m #

foldMap :: Monoid m => (a -> m) -> Array sh a -> m #

foldr :: (a -> b -> b) -> b -> Array sh a -> b #

foldr' :: (a -> b -> b) -> b -> Array sh a -> b #

foldl :: (b -> a -> b) -> b -> Array sh a -> b #

foldl' :: (b -> a -> b) -> b -> Array sh a -> b #

foldr1 :: (a -> a -> a) -> Array sh a -> a #

foldl1 :: (a -> a -> a) -> Array sh a -> a #

toList :: Array sh a -> [a] #

null :: Array sh a -> Bool #

length :: Array sh a -> Int #

elem :: Eq a => a -> Array sh a -> Bool #

maximum :: Ord a => Array sh a -> a #

minimum :: Ord a => Array sh a -> a #

sum :: Num a => Array sh a -> a #

product :: Num a => Array sh a -> a #

C sh => Traversable (Array sh) Source # 
Instance details

Defined in Data.Array.Comfort.Boxed.Internal

Methods

traverse :: Applicative f => (a -> f b) -> Array sh a -> f (Array sh b) #

sequenceA :: Applicative f => Array sh (f a) -> f (Array sh a) #

mapM :: Monad m => (a -> m b) -> Array sh a -> m (Array sh b) #

sequence :: Monad m => Array sh (m a) -> m (Array sh a) #

(C sh, Show sh, Show a) => Show (Array sh a) Source # 
Instance details

Defined in Data.Array.Comfort.Boxed.Internal

Methods

showsPrec :: Int -> Array sh a -> ShowS #

show :: Array sh a -> String #

showList :: [Array sh a] -> ShowS #

(C sh, NFData sh, NFData a) => NFData (Array sh a) Source # 
Instance details

Defined in Data.Array.Comfort.Boxed.Internal

Methods

rnf :: Array sh a -> () #

shape :: Array sh a -> sh Source #

(!) :: Indexed sh => Array sh a -> Index sh -> a infixl 9 Source #

toList :: C sh => Array sh a -> [a] Source #

toAssociations :: Indexed sh => Array sh a -> [(Index sh, a)] Source #

fromList :: C sh => sh -> [a] -> Array sh a Source #

map :: C sh => (a -> b) -> Array sh a -> Array sh b Source #

zipWith :: (C sh, Eq sh) => (a -> b -> c) -> Array sh a -> Array sh b -> Array sh c Source #

(//) :: Indexed sh => Array sh a -> [(Index sh, a)] -> Array sh a Source #

accumulate :: Indexed sh => (a -> b -> a) -> Array sh a -> [(Index sh, b)] -> Array sh a Source #

fromAssociations :: Indexed sh => sh -> a -> [(Index sh, a)] -> Array sh a Source #