From: David Vazquez Date: Mon, 14 Jan 2013 19:57:05 +0000 (+0000) Subject: Change definition of T and NIL, as package is kept in host now X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=ec156a1c781c52130d9ebb214610dd9ee41be81e;hp=f008590b4b2dbf551c2ce9ee4c173219161e289b;p=jscl.git Change definition of T and NIL, as package is kept in host now --- 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)