vector-builder alternatives and similar packages
Based on the "vector" category.
Alternatively, view vector-builder alternatives based on common mentions on social networks and blogs.
-
vector
An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop optimisation framework . -
vector-binary-instances
Instances for the Haskell Binary class, for the types defined in the popular vector package.
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of vector-builder or a related project?
README
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 produce the output 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 <>
foldMap B.singleton list <>
B.singleton element