I need a function that:
on first iteration returns 0, on each next iteration returns previous number incremented by 1, e.g 
first iteration - 0 
second iteration - 1
third iteration - 2

but **the catch is** that it doesn't take any arguments and it also **doesn't use any global variables** (or variables outside of that function).

Do you have any idea how to implement it without using any global variables?