Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data LSeq n a
- toSeq :: LSeq n a -> Seq a
- empty :: LSeq 0 a
- fromList :: Foldable f => f a -> LSeq 0 a
- fromNonEmpty :: NonEmpty a -> LSeq 1 a
- fromSeq :: Seq a -> LSeq 0 a
- toNonEmpty :: LSeq (1 + n) a -> NonEmpty a
- (<|) :: a -> LSeq n a -> LSeq (1 + n) a
- (|>) :: LSeq n a -> a -> LSeq (1 + n) a
- (><) :: LSeq n a -> LSeq m a -> LSeq (n + m) a
- eval :: forall proxy n m a. KnownNat n => proxy n -> LSeq m a -> Maybe (LSeq n a)
- index :: LSeq n a -> Int -> a
- adjust :: (a -> a) -> Int -> LSeq n a -> LSeq n a
- partition :: (a -> Bool) -> LSeq n a -> (LSeq 0 a, LSeq 0 a)
- mapWithIndex :: (Int -> a -> b) -> LSeq n a -> LSeq n b
- take :: Int -> LSeq n a -> LSeq 0 a
- drop :: Int -> LSeq n a -> LSeq 0 a
- unstableSortBy :: (a -> a -> Ordering) -> LSeq n a -> LSeq n a
- data ViewL n a where
- viewl :: LSeq (1 + n) a -> ViewL (1 + n) a
- pattern (:<|) :: forall a n. () => forall n1. (~#) Nat Nat ((+) 1 n) ((+) 1 n1) => a -> LSeq n1 a -> LSeq ((+) 1 n) a
- pattern (:<<) :: forall a n. a -> LSeq 0 a -> LSeq n a
- pattern EmptyL :: forall a n. LSeq n a
- data ViewR n a where
- viewr :: LSeq (1 + n) a -> ViewR (1 + n) a
- pattern (:|>) :: forall a n. () => forall n1. (~#) Nat Nat ((+) 1 n) ((+) 1 n1) => LSeq n1 a -> a -> LSeq ((+) 1 n) a
- promise :: LSeq m a -> LSeq n a
Documentation
LSeq n a certifies that the sequence has *at least* n items
Functor (LSeq n) Source # | |
Foldable (LSeq n) Source # | |
Traversable (LSeq n) Source # | |
Eq a => Eq (LSeq n a) Source # | |
Ord a => Ord (LSeq n a) Source # | |
Read a => Read (LSeq n a) Source # | |
Show a => Show (LSeq n a) Source # | |
Semigroup (LSeq n a) Source # | |
Monoid (LSeq 0 a) Source # | |
Ixed (LSeq n a) Source # | |
type Index (LSeq n a) Source # | |
type IxValue (LSeq n a) Source # | |
fromNonEmpty :: NonEmpty a -> LSeq 1 a Source #
index :: LSeq n a -> Int -> a Source #
get the element with index i, counting from the left and starting at 0. O(log(min(i,n-i)))
pattern (:<|) :: forall a n. () => forall n1. (~#) Nat Nat ((+) 1 n) ((+) 1 n1) => a -> LSeq n1 a -> LSeq ((+) 1 n) a infixr 5 Source #