Skip to content

Commit

Permalink
fix extra_args expansion for map_and_time
Browse files Browse the repository at this point in the history
  • Loading branch information
HighDiceRoller committed Sep 13, 2024
1 parent a393858 commit d95f557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/icepool/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def map_and_time(

result: 'icepool.Die[tuple[T, int]]' = state.map(lambda x: (x, 0))

def transition_with_steps(outcome_and_steps):
def transition_with_steps(outcome_and_steps, *extra_args):
outcome, steps = outcome_and_steps
next_outcome = transition_function(outcome, *extra_args)
if icepool.population.markov_chain.is_absorbing(outcome, next_outcome):
Expand All @@ -687,7 +687,7 @@ def transition_with_steps(outcome_and_steps):

for _ in range(repeat):
next_result: 'icepool.Die[tuple[T, int]]' = map(
transition_with_steps, result)
transition_with_steps, result, *extra_args)
if result == next_result:
return next_result
result = next_result
Expand Down

0 comments on commit d95f557

Please sign in to comment.