diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res index 472ae60b..48fdc67f 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Number.res @@ -20,6 +20,18 @@ module NumberToNumber = { ) } +module TwoNumbersToNumber = { + let make = (name, fn) => + FnDefinition.make( + ~name, + ~inputs=[FRTypeNumber, FRTypeNumber], + ~run=(_, inputs, _, _) => { + inputs->Prepare.ToValueTuple.twoNumbers->E.R2.fmap(fn)->E.R2.fmap(Wrappers.evNumber) + }, + (), + ) +} + module ArrayNumberDist = { let make = (name, fn) => { FnDefinition.make(