diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-11 15:14:06 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2013-07-11 15:14:06 +0200 |
commit | d638f4ca0259ac32f76c8295407666caec5df689 (patch) | |
tree | 8810d768e957a6829b894450b8566e3c895fe3cb | |
parent | 37ae73ec20e4a7dadee99867f45cc175486739fd (diff) |
Add functions EVAL and LOAD.
-rw-r--r-- | sb-eval2.lisp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sb-eval2.lisp b/sb-eval2.lisp index 8cbb53d..371a51b 100644 --- a/sb-eval2.lisp +++ b/sb-eval2.lisp @@ -422,6 +422,19 @@ t)) +(defun eval (form) + (funcall (prepare-form form) (make-null-environment))) + + +(defun load (filename) + ;;FIXME: set :LOAD-TOPLEVEL time. + (let ((eof (gensym))) + (with-open-file (in filename) + (loop for form = (read in nil eof nil) + until (eq form eof) + do (eval form))))) + + #+(or) (funcall (prepare-form '(funcall (funcall |