tweak: in Danger namespace change function name
to make clear that it takes only two inputs, while I build the many-inputs version
This commit is contained in:
parent
9551aae634
commit
2f33559e77
|
@ -176,7 +176,7 @@ module Internals = {
|
||||||
currentMarginalReturns: result<array<float>, string>,
|
currentMarginalReturns: result<array<float>, string>,
|
||||||
}
|
}
|
||||||
type diminishingReturnsAccumulator = result<diminishingReturnsAccumulatorInner, string>
|
type diminishingReturnsAccumulator = result<diminishingReturnsAccumulatorInner, string>
|
||||||
let diminishingMarginalReturnsSkeleton = (
|
let diminishingMarginalReturnsForTwoFunctions = (
|
||||||
lambda1,
|
lambda1,
|
||||||
lambda2,
|
lambda2,
|
||||||
funds,
|
funds,
|
||||||
|
@ -453,14 +453,14 @@ let library = [
|
||||||
(),
|
(),
|
||||||
),
|
),
|
||||||
Function.make(
|
Function.make(
|
||||||
~name="diminishingMarginalReturnsSkeleton",
|
~name="diminishingMarginalReturnsForTwoFunctions",
|
||||||
~nameSpace,
|
~nameSpace,
|
||||||
~output=EvtArray,
|
~output=EvtArray,
|
||||||
~requiresNamespace=false,
|
~requiresNamespace=false,
|
||||||
~examples=[`Danger.diminishingMarginalReturnsSkeleton({|x| x+1}, {|y| 10}, 100, 1)`],
|
~examples=[`Danger.diminishingMarginalReturnsForTwoFunctions({|x| x+1}, {|y| 10}, 100, 1)`],
|
||||||
~definitions=[
|
~definitions=[
|
||||||
FnDefinition.make(
|
FnDefinition.make(
|
||||||
~name="diminishingMarginalReturnsSkeleton",
|
~name="diminishingMarginalReturnsForTwoFunctions",
|
||||||
~inputs=[FRTypeLambda, FRTypeLambda, FRTypeNumber, FRTypeNumber],
|
~inputs=[FRTypeLambda, FRTypeLambda, FRTypeNumber, FRTypeNumber],
|
||||||
~run=(inputs, _, env, reducer) =>
|
~run=(inputs, _, env, reducer) =>
|
||||||
switch inputs {
|
switch inputs {
|
||||||
|
@ -470,7 +470,7 @@ let library = [
|
||||||
IEvNumber(funds),
|
IEvNumber(funds),
|
||||||
IEvNumber(approximateIncrement),
|
IEvNumber(approximateIncrement),
|
||||||
] =>
|
] =>
|
||||||
Internals.diminishingMarginalReturnsSkeleton(
|
Internals.diminishingMarginalReturnsForTwoFunctions(
|
||||||
lambda1,
|
lambda1,
|
||||||
lambda2,
|
lambda2,
|
||||||
funds,
|
funds,
|
||||||
|
@ -478,7 +478,7 @@ let library = [
|
||||||
env,
|
env,
|
||||||
reducer,
|
reducer,
|
||||||
)
|
)
|
||||||
| _ => Error("Error in Danger.diminishingMarginalReturnsSkeleton")
|
| _ => Error("Error in Danger.diminishingMarginalReturnsForTwoFunctions")
|
||||||
},
|
},
|
||||||
(),
|
(),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user