|
| Seq | | Portability | portable | | Stability | provisional | | Maintainer | daan@cs.uu.nl |
|
|
|
|
| Contents |
- Type
- Operators
- Construction
- Conversion
|
|
| Description |
| An implementation of John Hughes's efficient catenable sequence type. A lazy sequence
Seq a can be concatenated in O(1) time. After
construction, the sequence in converted in O(n) time into a list.
|
|
| Synopsis |
|
|
|
|
| Type |
|
| data Seq a |
|
|
| Operators |
|
| (<>) :: Seq a -> Seq a -> Seq a |
| O(1). Append two sequences, see append. |
|
| Construction |
|
| empty :: Seq a |
| O(1). Create an empty sequence. |
|
| single :: a -> Seq a |
| O(1). Create a sequence of one element. |
|
| cons :: a -> Seq a -> Seq a |
| O(1). Put a value in front of a sequence. |
|
| append :: Seq a -> Seq a -> Seq a |
| O(1). Append two sequences. |
|
| Conversion |
|
| toList :: Seq a -> [a] |
| O(n). Convert a sequence to a list. |
|
| fromList :: [a] -> Seq a |
| O(n). Create a sequence from a list. |
|
| Produced by Haddock version 0.4 |