| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Data.RandomAccessList.SkewBinary
Synopsis
- data RAList a where
- contIndexZero ∷ ∀ a b. (Maybe a → b) → RAList a → Word64 → b
- contIndexOne ∷ ∀ a b. (Maybe a → b) → RAList a → Word64 → b
- safeIndexZero ∷ RAList a → Word64 → Maybe a
- unsafeIndexZero ∷ RAList a → Word64 → a
- safeIndexOne ∷ RAList a → Word64 → Maybe a
- unsafeIndexOne ∷ RAList a → Word64 → a
- null ∷ RAList a → Bool
- uncons ∷ RAList a → Maybe (a, RAList a)
Documentation
A strict list of complete binary trees accompanied by their size. The trees appear in >=-size order. Note: this list is strict in its spine, unlike the Prelude list
Constructors
| Nil |
Instances
| IsList (RAList a) Source # | |
| Show a ⇒ Show (RAList a) Source # | |
| Eq a ⇒ Eq (RAList a) Source # | |
| RandomAccessList (RAList a) Source # | |
Defined in Data.RandomAccessList.SkewBinary Methods cons ∷ Element (RAList a) → RAList a → RAList a Source # uncons ∷ RAList a → Maybe (Element (RAList a), RAList a) Source # length ∷ RAList a → Word64 Source # consSlab ∷ NonEmptyVector (Element (RAList a)) → RAList a → RAList a Source # indexZero ∷ RAList a → Word64 → Maybe (Element (RAList a)) Source # indexOne ∷ RAList a → Word64 → Maybe (Element (RAList a)) Source # unsafeIndexZero ∷ RAList a → Word64 → Element (RAList a) Source # unsafeIndexOne ∷ RAList a → Word64 → Element (RAList a) Source # | |
| type Item (RAList a) Source # | |
| type Element (RAList a) Source # | |
Defined in Data.RandomAccessList.SkewBinary | |
contIndexZero ∷ ∀ a b. (Maybe a → b) → RAList a → Word64 → b Source #
Look up a zero-based index and pass the result to the continuation.
An out-of-bounds index gives Nothing.
contIndexOne ∷ ∀ a b. (Maybe a → b) → RAList a → Word64 → b Source #
Look up a one-based index and pass the result to the continuation.
Zero and indices beyond the end give Nothing.
unsafeIndexZero ∷ RAList a → Word64 → a Source #
unsafeIndexOne ∷ RAList a → Word64 → a Source #