EQ primitive function
authorDavid Vazquez <davazp@gmail.com>
Sun, 16 Dec 2012 03:50:56 +0000 (03:50 +0000)
committerDavid Vazquez <davazp@gmail.com>
Sun, 16 Dec 2012 03:50:56 +0000 (03:50 +0000)
lispstrack.lisp
test.lisp

index 23bee21..176ca35 100644 (file)
 (define-compilation symbol-name (x)
   (concat "(" (ls-compile x env fenv) ").name"))
 
+(define-compilation eq (x y)
+  (concat "(" (ls-compile x env fenv) " === " (ls-compile y env fenv) ")"))
+
 
 
 (defmacro with-eval-when-compilation (&body body)
index 4b6e015..a38014b 100644 (file)
--- a/test.lisp
+++ b/test.lisp
@@ -1,5 +1,4 @@
-(lambda (x y)
-  x)
+(lambda (x y) x)
 
 (debug "hola")
 (debug '(1 2 3 4))
 (debug (car (cons 1 2)))
 (debug (cdr (cons 1 2)))
 
+(setq x '(1 . 2))
+(debug x)
+(debug (eq x x))
+(debug (eq '(1 . 2) '(1 . 2)))
+
 ;;; Symbols
 (debug (symbol-name 'foo))
 (debug (symbol-name 'foo-bar))
 
+
 ;;; &rest lambda-list
 
 (debug (lambda (&rest x) x))