Linear code is more readable - eviltoast
  • robinm@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

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