• robinm@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    One way to make it obvious which function can be called at which state is to use different type. Like UnbackedPizzà and CookedPizzà, and the bake function takes the former and returns the later.