Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Seq a :: * -> *
- (<|) :: a -> Seq a -> Seq a
- (|>) :: Seq a -> a -> Seq a
- concat :: Foldable f => f (Seq a) -> Seq a
- dropWhileL :: (a -> Bool) -> Seq a -> Seq a
- dropWhileR :: (a -> Bool) -> Seq a -> Seq a
- empty :: Seq a
- filter :: (a -> Bool) -> Seq a -> Seq a
- fromList :: [a] -> Seq a
- intersperse :: a -> Seq a -> Seq a
- map :: (a -> b) -> Seq a -> Seq b
- minimum :: Ord a => Seq a -> Maybe a
- null :: Seq a -> Bool
- toList :: Foldable t => forall a. t a -> [a]
- singleton :: a -> Seq a
Documentation
General-purpose finite sequences.
Monad Seq | |
Functor Seq | |
Applicative Seq | |
Foldable Seq | |
Traversable Seq | |
Alternative Seq | |
MonadPlus Seq | |
IsList (Seq a) | |
Eq a => Eq (Seq a) | |
Data a => Data (Seq a) | |
Ord a => Ord (Seq a) | |
Read a => Read (Seq a) | |
Show a => Show (Seq a) | |
IsString (Seq Char) | |
Semigroup (Seq a) | |
Monoid (Seq a) | |
NFData a => NFData (Seq a) | |
type Item (Seq a) | |
(<|) :: a -> Seq a -> Seq a infixr 5 #
O(1). Add an element to the left end of a sequence. Mnemonic: a triangle with the single element at the pointy end.
(|>) :: Seq a -> a -> Seq a infixl 5 #
O(1). Add an element to the right end of a sequence. Mnemonic: a triangle with the single element at the pointy end.
dropWhileL :: (a -> Bool) -> Seq a -> Seq a #
O(i) where i is the prefix length.
returns
the suffix remaining after dropWhileL
p xs
.takeWhileL
p xs
dropWhileR :: (a -> Bool) -> Seq a -> Seq a #
O(i) where i is the suffix length.
returns
the prefix remaining after dropWhileR
p xs
.takeWhileR
p xs
is equivalent to dropWhileR
p xs
.reverse
(dropWhileL
p (reverse
xs))
filter :: (a -> Bool) -> Seq a -> Seq a #
O(n). The filter
function takes a predicate p
and a sequence
xs
and returns a sequence of those elements which satisfy the
predicate.
intersperse :: a -> Seq a -> Seq a Source #