-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra args to MultisetEvaluator
?
#218
Comments
This also brings up the question of early/late binding in nested closures. Compare a recent example: @multiset_function
def total_and_burst(rolls):
return rolls.sum(), rolls.keep_outcomes([dtn]).count() with @multiset_function
def total_and_burst(rolls):
return rolls.sum(), rolls.keep_outcomes(lambda x: x == dtn).count() In the first case we have early binding of Here it may be preferable if @multiset_function
def total_and_burst(rolls, *, dtn):
return rolls.sum(), rolls.keep_outcomes([dtn]).count() Now there is no worry about side effects. But how can we delay evaluating
|
What about the interaction with |
Could this be solved by splitting the evaluation into an expression builder stage and an evaluation stage? When we do If we are actually running the evaluation, we could proceed similar to now, though if we want to expand the arguments a la If it is inside a There would also seem to be a different meaning of keyword arguments between the two cases. In a normal evaluation they are proposed to be sent to Should So what then is an evaluation? Effectively a tuple of |
We'll also eventually want to do unbinding after the |
Naming: For the user-visible object:
For the preparation method:
For the prepared object:
|
These would be constant over the lifetime of an evaluation and sent to
next_state
etc. Possibly keyword arguments only in order to avoid forcing everyone to add additional arguments tonext_state
etc.The text was updated successfully, but these errors were encountered: