Cumprod and formatting

This commit is contained in:
Ozzie Gooen 2022-06-08 08:21:20 -07:00
parent fc40744053
commit b48a0575d9
3 changed files with 10 additions and 2 deletions

View File

@ -223,6 +223,14 @@ let registry = [
),
],
),
Function.make(
~name="Cumulative Prod",
~definitions=[
ArrayNumberDist.make("cumprod", r =>
r->E.A.Floats.cumsum->E.A2.fmap(Wrappers.evNumber)->Wrappers.evArray->Ok
),
],
),
Function.make(
~name="Diff",
~definitions=[

View File

@ -24,4 +24,4 @@ let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option<
EV.EvDate(DateTime.Date.addDuration(d1, d2))->Ok->Some
| _ => None
}
}
}

View File

@ -29,4 +29,4 @@ let dispatch = (call: EV.functionCall, _: DistributionOperation.env): option<
EV.EvTimeDuration(DateTime.Duration.divide(d1, d2))->Ok->Some
| _ => None
}
}
}