@no-day/fp-ts-numeric-vectors
v0.1.0-rc.4
Published
Immutable numeric vectors for [fp-ts](https://github.com/gcanti/fp-ts).
Downloads
6
Readme
fp-ts-numeric-vectors
Immutable numeric vectors for fp-ts.
Install
npm install fp-ts @no-day/fp-ts-numeric-vectors
Docs
Examples
Simple
import { add, sub, div, Vec2n } from "fp-ts-numeric-vectors/vec2n";
import { pipe } from "fp-ts/function";
const result: Vec2n = pipe(
add([0.456, 4.34], [0.1, 2]),
_ => sub(_, [1, 3.1]),
_ => div(_, [2, 2])
);
console.log(result);