tweak: Add skeleton for calculating dimishing returns allocation
This commit is contained in:
parent
f370c44771
commit
aa3173f85b
|
@ -168,7 +168,16 @@ module Internals = {
|
||||||
}
|
}
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
@dead let getDiminishingMarginalReturnsEquilibrium = "To do"
|
let diminishingMarginalReturnsSkeleton = (
|
||||||
|
lambda1,
|
||||||
|
lambda2,
|
||||||
|
funds,
|
||||||
|
increment,
|
||||||
|
environment,
|
||||||
|
reducer,
|
||||||
|
) => {
|
||||||
|
Ok(castFloatToInternalNumber(0.0))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let library = [
|
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")
|
||||||
|
},
|
||||||
|
(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
(),
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user