| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.Terminal.Emulator.TermLines
Synopsis
- type TermLine = Vector Cell
- type TermLines = StrictSeq TermLine
- empty :: StrictSeq a
- length :: StrictSeq a -> Int
- singleton :: a -> StrictSeq a
- replicate :: Int -> a -> StrictSeq a
- vIndex :: Int -> Lens' (StrictSeq a) a
- head :: StrictSeq a -> a
- last :: StrictSeq a -> a
- take :: Int -> StrictSeq a -> StrictSeq a
- takeLast :: Int -> StrictSeq a -> StrictSeq a
- drop :: Int -> StrictSeq a -> StrictSeq a
- dropLast :: Int -> StrictSeq a -> StrictSeq a
- traverseWithIndex :: Applicative f => (Int -> a -> f b) -> StrictSeq a -> f (StrictSeq b)
- toSeq :: StrictSeq a -> Seq a
Documentation
replicate :: Int -> a -> StrictSeq a Source #
replicate n x is a sequence consisting of n copies of x.
vIndex :: Int -> Lens' (StrictSeq a) a Source #
A lens to the specified index of the sequence. Must be in range.
take :: Int -> StrictSeq a -> StrictSeq a Source #
The first i elements of a sequence. If i is negative, take i s
yields the empty sequence. If the sequence contains fewer than i
elements, the whole sequence is returned.
takeLast :: Int -> StrictSeq a -> StrictSeq a Source #
The last i elements of a sequence. If i is negative, takeLast i s
yields the empty sequence. If the sequence contains fewer than i
elements, the whole sequence is returned.
drop :: Int -> StrictSeq a -> StrictSeq a Source #
Elements of a sequence after the first i. If i is negative, drop i
s yields the whole sequence. If the sequence contains fewer than i
elements, the empty sequence is returned.
dropLast :: Int -> StrictSeq a -> StrictSeq a Source #
Elements of a sequence after the first i last elements. If i is
negative, dropLast i s yields the whole sequence. If the sequence
contains fewer than i elements, the empty sequence is returned.
traverseWithIndex :: Applicative f => (Int -> a -> f b) -> StrictSeq a -> f (StrictSeq b) Source #
traverseWithIndex is a version of traverse that also offers access to
the index of each element.