Change definition of T and NIL, as package is kept in host now
authorDavid Vazquez <davazp@gmail.com>
Mon, 14 Jan 2013 19:57:05 +0000 (19:57 +0000)
committerDavid Vazquez <davazp@gmail.com>
Mon, 14 Jan 2013 19:57:05 +0000 (19:57 +0000)
ecmalisp.lisp

index eea0584..c77c154 100644 (file)
 
   (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))
 (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
       ""
       (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
          do (write-line line)))))
 
 
+(defun test ()
+  (mapcar (lambda (x) (1+ x)) '(1 2 3 4)))
+
 (defun integer-to-string (x)
   (cond
     ((zerop x)