An API for efficient and convenient construction of vectors. It provides the composable
Builder
abstraction, which has instances of theMonoid
andSemigroup
classes.[Usage]
First you use the
Builder
abstraction to specify the structure of the vector. Then you execute the builder to actually produce the vector.[Example]
The following code shows how you can efficiently concatenate different datastructures into a single immutable vector:
> >import qualified Data.Vector as A >import qualified VectorBuilder.Builder as B >import qualified VectorBuilder.Vector as C > > >myVector :: A.Vector a -> [a] -> a -> A.Vector a >myVector vector list element = > C.build builder > where > builder = > B.vector vector <> > B.foldable list <> > B.singleton element.
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
0.3.8.5-bp156.1.1 info | GA Release | 2024-03-05 | 15 SP6 |
|
|
0.3.8.3-bp155.2.13 info | GA Release | 2023-05-22 | 15 SP5 |
|
|
0.3.8.3-bp154.1.11 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
0.3.8-bp153.1.20 info | GA Release | 2021-04-08 | 15 SP3 |
|
|
0.3.8-bp152.1.12 info | GA Release | 2020-06-16 | 15 SP2 |
|
|
0.3.7.2-bp151.2.2 info | GA Release | 2019-07-17 | 15 SP1 |
|
|
0.3.7.2-bp151.1.10 info | GA Release | 2019-05-31 | 15 SP1 |
|
|