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 96576821..6136e46a 100644 --- a/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res +++ b/packages/squiggle-lang/src/rescript/FunctionRegistry/Library/FR_Danger.res @@ -168,7 +168,16 @@ module Internals = { } result } - @dead let getDiminishingMarginalReturnsEquilibrium = "To do" + let diminishingMarginalReturnsSkeleton = ( + lambda1, + lambda2, + funds, + increment, + environment, + reducer, + ) => { + Ok(castFloatToInternalNumber(0.0)) + } } let library = [ @@ -343,4 +352,25 @@ let library = [ ], (), ), + Function.make( + ~name="diminishingMarginalReturnsSkeleton", + ~nameSpace, + ~output=EvtNumber, + ~requiresNamespace=false, + ~examples=[`Danger.diminishingMarginalReturnsSkeleton({|x| x+1}, {|y| 10}, 100, 1)`], + ~definitions=[ + FnDefinition.make( + ~name="diminishingMarginalReturnsSkeleton", + ~inputs=[FRTypeLambda, FRTypeLambda, FRTypeNumber, FRTypeNumber], + ~run=(inputs, _, env, reducer) => + switch inputs { + | [IEvLambda(lambda1), IEvLambda(lambda2), IEvNumber(funds), IEvNumber(increment)] => + Internals.diminishingMarginalReturnsSkeleton(lambda1, lambda2, funds, increment, env, reducer) + | _ => Error("Error in Danger.diminishingMarginalReturnsSkeleton") + }, + (), + ), + ], + (), + ), ]