vector-builder: Vector builder
An API for efficient and convenient construction of vectors.
It provides the composable Builder
abstraction, which has instances of the Monoid
and Semigroup
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
Modules
[Index] [Quick Jump]
Downloads
- vector-builder-0.3.8.2.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.1.1, 0.2, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.3.1, 0.3.4, 0.3.4.1, 0.3.5, 0.3.6, 0.3.7, 0.3.7.1, 0.3.7.2, 0.3.8, 0.3.8.1, 0.3.8.2, 0.3.8.3, 0.3.8.4, 0.3.8.5, 0.3.8.6 |
---|---|
Dependencies | base (>=4.12 && <5), vector (>=0.12 && <0.13) [details] |
License | MIT |
Copyright | (c) 2016, Nikita Volkov |
Author | Nikita Volkov <nikita.y.volkov@mail.ru> |
Maintainer | Nikita Volkov <nikita.y.volkov@mail.ru> |
Revised | Revision 1 made by sjakobi at 2021-12-31T00:29:03Z |
Category | Vector |
Home page | https://github.com/nikita-volkov/vector-builder |
Bug tracker | https://github.com/nikita-volkov/vector-builder/issues |
Source repo | head: git clone git://github.com/nikita-volkov/vector-builder.git |
Uploaded | by NikitaVolkov at 2021-07-07T07:30:27Z |
Distributions | Arch:0.3.8.6, Debian:0.3.8, Fedora:0.3.8.5, LTSHaskell:0.3.8.6, NixOS:0.3.8.5, Stackage:0.3.8.6 |
Reverse Dependencies | 12 direct, 4630 indirect [details] |
Downloads | 23872 total (17 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2021-07-07 [all 1 reports] |