From 25dce72f11aa762c9853c96b80f7c2ad05c25f8d Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Wed, 21 Sep 2022 03:03:17 +0400 Subject: [PATCH] getExn -> get --- packages/squiggle-lang/src/rescript/FR/FR_Pointset.res | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res b/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res index 8996ac3b..4babe231 100644 --- a/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res +++ b/packages/squiggle-lang/src/rescript/FR/FR_Pointset.res @@ -5,17 +5,17 @@ let nameSpace = "PointSet" let requiresNamespace = true let inputsToDist = (inputs: array, xyShapeToPointSetDist) => { - // TODO - rewritein more functional/functor-based style + // TODO - rewrite in more functional/functor-based style switch inputs { | [IEvArray(items)] => { items->Belt.Array.map( item => switch item { | IEvRecord(map) => { - let xValue = map->Belt.Map.String.getExn("x") - let yValue = map->Belt.Map.String.getExn("y") + let xValue = map->Belt.Map.String.get("x") + let yValue = map->Belt.Map.String.get("y") switch (xValue, yValue) { - | (IEvNumber(x), IEvNumber(y)) => (x, y) + | (Some(IEvNumber(x)), Some(IEvNumber(y))) => (x, y) | _ => impossibleError->Reducer_ErrorValue.toException } }