ink
ink copied to clipboard
Incrementing list (state machine) out of index nulls it
Borrowing from the example in the Writing with Ink book:
LIST PancakeState = ingredients_gathered, batter_mix, pan_hot, pancakes_tossed, (ready_to_eat)
{PancakeState} (Prints "ready_to_eat")
~ PancakeState++
{PancakeState} (PancakeState doesn't print)
~ PancakeState--
{PancakeState} (PancakeState doesn't print)
In this case, nulling the variable is just failing silently, and could lead to problems. I would suggest either raising an exception, or not incrementing the index (which seems like the more ink way to do it)