Lisp interpreter made with Action Script 3.
solve-et-coagula.com
The author talks about his work on http://www.solve-et-coagula.com/?p=8.
solve-et-coagula.com
User>(defun accgen (x)
(lambda (y)
(incf x y)))
ACCGEN
User>(setf foo (accgen 5))
<Interpreted Lisp Function>
User>(funcall foo 5)
NaN
User>(let ((bar "bar"))
(defun qux ()
(print bar)))
QUX
User>(qux)
null
User>Wrong. I was curious so i tested it (i've been experimenting with Flex 2). The following code outputs "blah blah":
var foo:Function = function() {}
foo.prototype.someMethod = function() { trace("blah blah"); }
new foo().someMethod();
I think the prototype syntax was kept to maintain backwards compatibility.
class foo {
public function someMethod() { trace("blah blah"); }
}new foo().someMethod();
just different approaches to the same problem