From 2f33559e779915eb5720b5be6e384d6f0647f8c0 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 5 Sep 2022 16:40:17 +0200 Subject: [PATCH] tweak: in Danger namespace change function name to make clear that it takes only two inputs, while I build the many-inputs version --- .../rescript/FunctionRegistry/Library/FR_Danger.res | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res index a8e33d07..557331f1 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res @@ -176,7 +176,7 @@ module Internals = { currentMarginalReturns: result, string>, } type diminishingReturnsAccumulator = result - let diminishingMarginalReturnsSkeleton = ( + let diminishingMarginalReturnsForTwoFunctions = ( lambda1, lambda2, funds, @@ -453,14 +453,14 @@ let library = [ (), ), Function.make( - ~name="diminishingMarginalReturnsSkeleton", + ~name="diminishingMarginalReturnsForTwoFunctions", ~nameSpace, ~output=EvtArray, ~requiresNamespace=false, - ~examples=[`Danger.diminishingMarginalReturnsSkeleton({|x| x+1}, {|y| 10}, 100, 1)`], + ~examples=[`Danger.diminishingMarginalReturnsForTwoFunctions({|x| x+1}, {|y| 10}, 100, 1)`], ~definitions=[ FnDefinition.make( - ~name="diminishingMarginalReturnsSkeleton", + ~name="diminishingMarginalReturnsForTwoFunctions", ~inputs=[FRTypeLambda, FRTypeLambda, FRTypeNumber, FRTypeNumber], ~run=(inputs, _, env, reducer) => switch inputs { @@ -470,7 +470,7 @@ let library = [ IEvNumber(funds), IEvNumber(approximateIncrement), ] => - Internals.diminishingMarginalReturnsSkeleton( + Internals.diminishingMarginalReturnsForTwoFunctions( lambda1, lambda2, funds, @@ -478,7 +478,7 @@ let library = [ env, reducer, ) - | _ => Error("Error in Danger.diminishingMarginalReturnsSkeleton") + | _ => Error("Error in Danger.diminishingMarginalReturnsForTwoFunctions") }, (), ),