From ec156a1c781c52130d9ebb214610dd9ee41be81e Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Mon, 14 Jan 2013 19:57:05 +0000 Subject: [PATCH 1/1] Change definition of T and NIL, as package is kept in host now --- ecmalisp.lisp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ecmalisp.lisp b/ecmalisp.lisp index eea0584..c77c154 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -63,11 +63,8 @@ (defvar *package* (new)) - (defvar nil (make-symbol "NIL")) - (oset *package* "NIL" nil) - - (defvar t (make-symbol "T")) - (oset *package* "T" t) + (defvar nil 'nil) + (defvar t 't) (defun null (x) (eq x nil)) @@ -473,9 +470,6 @@ (defmacro concatf (variable &body form) `(setq ,variable (concat ,variable (progn ,@form)))) -(defun mapconcat (func list) - (join (mapcar func list))) - ;;; Concatenate a list of strings, with a separator (defun join (list &optional (separator "")) (cond @@ -493,6 +487,8 @@ "" (concat (car list) separator (join-trailing (cdr list) separator)))) +(defun mapconcat (func list) + (join (mapcar func list))) ;;; Like CONCAT, but prefix each line with four spaces. Two versions ;;; of this function are available, because the Ecmalisp version is @@ -527,6 +523,9 @@ do (write-line line))))) +(defun test () + (mapcar (lambda (x) (1+ x)) '(1 2 3 4))) + (defun integer-to-string (x) (cond ((zerop x) -- 1.7.10.4