Skip to content

Incrementing list (state machine) out of index nulls it #935

@menaechmi

Description

@menaechmi

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions