author | Alan Dipert
<alan@dipert.org> 2019-12-28 07:00:14 UTC |
committer | Alan Dipert
<alan@dipert.org> 2019-12-28 07:00:14 UTC |
parent | 03671580d7a4ab67273498645fa118b509d1b015 |
notes.txt | +11 | -9 |
diff --git a/notes.txt b/notes.txt index 16f2f1a..c33e7c8 100644 --- a/notes.txt +++ b/notes.txt @@ -44,15 +44,17 @@ window (to-js "hello, world!")) ;; factorial -(%lambda (n &aux (prod 1)) - (%tagbody - t0 - (%if (!eql n 0) (%go done) nil) - (%set prod (!* prod n)) - (%set n (!- n 1)) - (%go t0) - done) - prod) +(%js "(~{}.fvalue = ~{})" + 'fact + (%lambda (n &aux (prod 1)) + (%tagbody + t0 + (%if (!eql n 0) (%go done) nil) + (%set prod (!* prod n)) + (%set n (!- n 1)) + (%go t0) + done) + prod)) (%let ((x 0)) (%tagbody