if else if else if else - eviltoast
  • Kogasa@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 year ago

    There’s no formal reason why the input to a recursive function must be a “smaller” or “simpler” version of itself, that’s just a way of explaining it intuitively/informally. You need to reduce the “complexity” (meant informally as ‘deviation from a trivial case’) at every step (only) if you want to the algorithm to actually finish.