Ability to declare a static variable in a procedure, function, or method
### Summary

The ability to declare a variable as static for a proc etc so global variables don't have to be used and thus stored in the BSS segment affecting efficiency. Closures could be used, at the expense of readability code complexity. Since static-type ability is present in C and C++ (and a closure could be implemented behind the scenes in Javascript if that is needed), if would seem not a great hurdle to add to nim-lang.

### Description

This is different from using the global pragma, which is to be avoided to keep the variable out of the BSS segment, which is where globals go. 

### Alternatives

_No response_

### Examples

    proc myCounter(): int = 
      static var c = 0 # only initialized once
      c = c + 1
      return c


### Backwards Compatibility

_No response_

### Links

_No response_