• Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    A list can store zero or more elements. A NonEmpty can store one or more element. That’s all.

    This overall strategy – representing the top of a list as a dedicated value – shows up elsewhere, notably in Forths, where it is called “top of stack” and often stored in a dedicated CPU register.