A function can be assigned to a variable, passed into another function or returned to its caller. A closure also retains access to variables in its surrounding scope. That makes a small counter or predicate convenient, but it means repeated calls can observe changes to the same captured state. Separate instances should not accidentally share that state. Choose whether you need a stored value or a new value on every call, and be explicit about the first result. These tasks build local counters, transformations and predicates for a fictional dispatch workflow. An empty input still has a well-defined result. A negative increment is just another update, and a function passed as an argument must run with the values the caller supplied.
Each call uses the state from the previous call.