Add filter command

This commit is contained in:
Ozzie Gooen 2020-02-29 18:16:47 +00:00
parent 6a86346b23
commit 297b280a93

View File

@ -156,6 +156,9 @@ let _transverseShape = (fn, p: t) => {
|> fromArray;
};
let filter = (fn, t: t) =>
t |> zip |> E.A.filter(fn) |> Belt.Array.unzip |> fromArray;
let accumulateYs = _transverseShape((aCurrent, aLast) => aCurrent +. aLast);
let subtractYs = _transverseShape((aCurrent, aLast) => aCurrent -. aLast);