Aaand now mutable variables work. I decided to make all variables mutable by default, but I miiiiight add in a way to make a variable constant.
Now there's two primitives for dealing with names: var and set!
(var a 10)
(set! a 20)
"def" then is built on top of them:
(var def
(vau e (list n v)
(eval e (list do (list var n %f)
(list set! n v)))))
Basically, that means (def a 5) is equivalent to (do (var a %f) (set! a 5))
This is important for recursive functions, which need to refer to themself. In other words, "var" is like "let" in Arc, and "def" is like "var" in JavaScript:
Ah, yes, I actually took out fn because I plan to build it in "02 nulan.nu" rather than "01 nulan.rkt". I put in a quick fix to get fn working, but I'll need to change that later.