From 0188e1908fdc55a98c0ebb99f3a95e2787dd7c5d Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Sun, 16 Dec 2012 03:50:56 +0000 Subject: [PATCH] EQ primitive function --- lispstrack.lisp | 3 +++ test.lisp | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lispstrack.lisp b/lispstrack.lisp index 23bee21..176ca35 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -187,6 +187,9 @@ (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) diff --git a/test.lisp b/test.lisp index 4b6e015..a38014b 100644 --- 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)) @@ -45,10 +44,16 @@ (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)) -- 1.7.10.4