How do you use “

<<- is most useful in conjunction with closures to maintain state. Here’s a section from a recent paper of mine: A closure is a function written by another function. Closures are so-called because they enclose the environment of the parent function, and can access all variables and parameters in that function. This is useful because … Read more

What is lexical scope?

I understand them through examples. 🙂 First, lexical scope (also called static scope), in C-like syntax: void fun() { int x = 5; void fun2() { printf(“%d”, x); } } Every inner level can access its outer levels. There is another way, called dynamic scope used by the first implementation of Lisp, again in a … Read more