diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res index 85cf5609..7ac42686 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/FunctionRegistry_Core.res @@ -333,7 +333,7 @@ module FnDefinition = { let isMatch = (t: t, args: array) => { let argValues = FRType.matchWithExpressionValueArray(t.inputs, args) switch argValues { - | Some(values) => true + | Some(_) => true | None => false } } diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res index 9a0745c1..dc4daead 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Pointset.res @@ -1,7 +1,7 @@ open FunctionRegistry_Core open FunctionRegistry_Helpers -let nameSpace = "PointSet" +let nameSpace = "Pointset" let requiresNamespace = true let inputsTodist = (inputs: array, makeDist) => { @@ -28,6 +28,15 @@ let library = [ ~name="makeContinuous", ~nameSpace, ~requiresNamespace, + ~examples=[ + `Pointset.makeContinuous([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, ~definitions=[ FnDefinition.make( ~name="makeContinuous", @@ -42,6 +51,15 @@ let library = [ ~name="makeDiscrete", ~nameSpace, ~requiresNamespace, + ~examples=[ + `Pointset.makeDiscrete([ + {x: 0, y: 0.2}, + {x: 1, y: 0.7}, + {x: 2, y: 0.8}, + {x: 3, y: 0.2} + ])`, + ], + ~output=ReducerInterface_InternalExpressionValue.EvtDistribution, ~definitions=[ FnDefinition.make( ~name="makeDiscrete",