Copyright | (c) Erich Gut |
---|---|
License | BSD3 |
Maintainer | zerich.gut@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
finite lists, parameterized by there length.
Synopsis
- data FinList (n :: N') a where
- toW :: FinList n a -> W n
- head :: FinList (n + 1) a -> a
- tail :: FinList (n + 1) a -> FinList n a
- zip :: FinList n a -> FinList n b -> FinList n (a, b)
- zip3 :: FinList n a -> FinList n b -> FinList n c -> FinList n (a, b, c)
- (|:) :: FinList n a -> a -> FinList (n + 1) a
- (++) :: FinList n a -> FinList m a -> FinList (n + m) a
- (**) :: FinList n a -> FinList m b -> FinList (n * m) (a, b)
- repeat :: Any n -> a -> FinList n a
- iFinList :: N -> FinList n a -> FinList n (a, N)
- iFinList0 :: FinList n a -> FinList n (a, N)
- iFinList' :: Any n -> FinList n N
- toArray :: FinList n a -> Array N a
- someFinList :: [a] -> SomeFinList a
- data SomeFinList a = forall n. SomeFinList (FinList n a)
- (<++>) :: SomeFinList x -> SomeFinList x -> SomeFinList x
- inductionS :: Any n -> FinList N0 a -> (forall i. FinList i a -> FinList (i + 1) a) -> FinList n a
- newtype FinList' a n = FinList' (FinList n a)
FinList
data FinList (n :: N') a where Source #
finite lists, parameterized by there length.
Instances
Foldable (FinList n) Source # | |
Defined in OAlg.Entity.FinList fold :: Monoid m => FinList n m -> m # foldMap :: Monoid m => (a -> m) -> FinList n a -> m # foldMap' :: Monoid m => (a -> m) -> FinList n a -> m # foldr :: (a -> b -> b) -> b -> FinList n a -> b # foldr' :: (a -> b -> b) -> b -> FinList n a -> b # foldl :: (b -> a -> b) -> b -> FinList n a -> b # foldl' :: (b -> a -> b) -> b -> FinList n a -> b # foldr1 :: (a -> a -> a) -> FinList n a -> a # foldl1 :: (a -> a -> a) -> FinList n a -> a # toList :: FinList n a -> [a] # length :: FinList n a -> Int # elem :: Eq a => a -> FinList n a -> Bool # maximum :: Ord a => FinList n a -> a # minimum :: Ord a => FinList n a -> a # | |
Functor (FinList n) Source # | |
Show a => Show (FinList n a) Source # | |
Eq a => Eq (FinList n a) Source # | |
Ord x => Ord (FinList n x) Source # | |
Defined in OAlg.Entity.FinList | |
Validable a => Validable (FinList n a) Source # | |
(Typeable n, Entity a) => Entity (FinList n a) Source # | |
Defined in OAlg.Entity.FinList |
zip :: FinList n a -> FinList n b -> FinList n (a, b) Source #
zips two sequences of the same length.
zip3 :: FinList n a -> FinList n b -> FinList n c -> FinList n (a, b, c) Source #
zips three sequences of the same length.
(|:) :: FinList n a -> a -> FinList (n + 1) a infixl 5 Source #
appending an element at the end of the finite list.
(++) :: FinList n a -> FinList m a -> FinList (n + m) a infixr 5 Source #
appending two finite lists.
(**) :: FinList n a -> FinList m b -> FinList (n * m) (a, b) Source #
the product of two finite lists.
iFinList :: N -> FinList n a -> FinList n (a, N) Source #
indexing finite lists, starting at the given natural number.
iFinList0 :: FinList n a -> FinList n (a, N) Source #
adjoins to each element its index, starting from '0'.
someFinList :: [a] -> SomeFinList a Source #
the associated finite list.
data SomeFinList a Source #
some finite list.
forall n. SomeFinList (FinList n a) |
Instances
Functor SomeFinList Source # | |
Defined in OAlg.Entity.FinList fmap :: (a -> b) -> SomeFinList a -> SomeFinList b # (<$) :: a -> SomeFinList b -> SomeFinList a # | |
Show a => Show (SomeFinList a) Source # | |
Defined in OAlg.Entity.FinList showsPrec :: Int -> SomeFinList a -> ShowS # show :: SomeFinList a -> String # showList :: [SomeFinList a] -> ShowS # |
(<++>) :: SomeFinList x -> SomeFinList x -> SomeFinList x infixr 5 Source #
concatenation.