yarn format compels me

This commit is contained in:
Quinn Dougherty 2022-09-01 12:48:20 +08:00
parent 989fa9644a
commit 9366ce61f3
3 changed files with 6 additions and 6 deletions

View File

@ -258,6 +258,6 @@ let toSparkline = (t: t, bucketCount): result<string, PointSetTypes.sparklineErr
->E.O2.toResult(PointSetTypes.CannotSparklineDiscrete)
->E.R2.fmap(r => Continuous.getShape(r).ys->Sparklines.create())
let makeDiscrete = (d):t => Discrete(d)
let makeContinuous = (d):t => Continuous(d)
let makeMixed = (d):t => Mixed(d)
let makeDiscrete = (d): t => Discrete(d)
let makeContinuous = (d): t => Continuous(d)
let makeMixed = (d): t => Mixed(d)

View File

@ -145,10 +145,10 @@ let mixture = (values: array<(t, float)>, intendedLength: int) => {
discreteSamples
->Belt.Array.mapWithIndex((index, distIndexToChoose) => {
let chosenDist = E.A.get(dists, E.Float.toInt(distIndexToChoose))
chosenDist -> E.O.bind(E.A.get(_, index))
chosenDist->E.O.bind(E.A.get(_, index))
})
->E.A.O.openIfAllSome
(samples -> E.O2.toExn("Mixture unreachable error"))->T.make
samples->E.O2.toExn("Mixture unreachable error")->T.make
}
let truncateLeft = (t, f) => T.get(t)->E.A2.filter(x => x >= f)->T.make

View File

@ -45,4 +45,4 @@ module Random = {
size: int,
}
@module external sample: (array<float>, sampleArgs) => array<float> = "@stdlib/random/sample"
}
}