(define lol
(let ((a 0))
(lambda ()
(set! a (+ a 1))
a)))
Scheme is a functional programming language in the same way python is. The only difference is that it has tail call optimisation and the stack doesn't have an arbitrary limit on the number of function calls it can hold.