vector-builder-0.3.8.6: Vector builder

Safe Haskell | None
Language | Haskell2010

VectorBuilder.Builder

Synopsis

- data Builder element
- empty :: Builder element
- singleton :: element -> Builder element
- size :: Builder element -> Int
- vector :: Vector vector element => vector element -> Builder element
- foldable :: Foldable foldable => foldable element -> Builder element

# Documentation

data Builder element Source #

An abstraction over the size of a vector for the process of its construction.

It postpones the actual construction of a vector until the execution of the builder.

#### Instances

Instances details

Monoid (Builder element) Source # | Provides support for O(1) concatenation.
Instance details Defined in VectorBuilder.Core.Builder Methods mempty :: Builder element Source # mappend :: Builder element -> Builder element -> Builder element Source # mconcat :: [Builder element] -> Builder element Source #
Semigroup (Builder element) Source # | Provides support for O(1) concatenation.
Instance details Defined in VectorBuilder.Core.Builder Methods (<>) :: Builder element -> Builder element -> Builder element Source # sconcat :: NonEmpty (Builder element) -> Builder element Source # stimes :: Integral b => b -> Builder element -> Builder element Source #

empty :: Builder element Source #

Empty builder.

singleton :: element -> Builder element Source #

Builder of a single element.

size :: Builder element -> Int Source #

Gets the size of a Builder.

vector :: Vector vector element => vector element -> Builder element Source #

Builder from an immutable vector of elements.

Supports all kinds of vectors: boxed, unboxed, primitive, storable.

foldable :: Foldable foldable => foldable element -> Builder element Source #