All Questions
Tagged with design-patterns imperative-programming
1 question
3
votes
2
answers
53
views
Is there a formal term for functions that have static state across executions?
Two examples, one in PHP:
function adder($i){
static $a = 0;
$a += $i;
return $a;
}
A similar effect can be achieved with closures in javascript:
...