Created
October 9, 2011 23:18
-
-
Save legumbre/1274351 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; Parenscript example | |
| ;;; /tmp/foo.lisp | |
| (defun foo-bar-baz () | |
| "foo bar baz" | |
| (mapcar (lambda (x) (+ 1 x)) (list 1 2 3))) | |
| ;; compile foo.lisp to foo.js | |
| (with-open-file (stream "/tmp/foo.js" :direction :output :if-exists :supersede) | |
| (format stream (ps-compile-file "/tmp/foo.lisp"))) | |
| ;; compile Parenscript runtime library | |
| ;; (provides mapcar and other HOFs) | |
| (with-open-file (stream "/tmp/runtime.js" :direction :output :if-exists :supersede) | |
| (format stream (ps* *ps-lisp-library*))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment