Created
December 5, 2015 13:31
-
-
Save takoeight0821/f33a9ef7f40ea4cca75f to your computer and use it in GitHub Desktop.
ちょっとCommon Lispをいじりたい時に
This file contains 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
#!/bin/sh | |
#|-*- mode:lisp -*-|# | |
#| | |
exec ros -Q -- $0 "$@" | |
|# | |
#| | |
$ ros build lisp.ros | |
$ ./lisp hoge | |
|# | |
(defpackage :portable-cl | |
(:use :cl)) | |
(in-package :portable-cl) | |
(ql:quickload :alexandria) | |
(use-package :alexandria) | |
(defmacro while (test &body body) | |
`(do () | |
((not ,test)) | |
,@body)) | |
(defun main (file-name &rest argv) | |
(declare (ignorable argv)) | |
(with-open-file (f file-name :direction :input) | |
(let (s) | |
(while (setq s (read f nil)) (eval s)))) | |
(terpri)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment