From: Raimon Grau Date: Sat, 15 Dec 2012 01:20:14 +0000 (+0100) Subject: = and test X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=8864a5f403bb799b7e369ff9985d2070af5100bf;p=jscl.git = and test --- diff --git a/lispstrack.lisp b/lispstrack.lisp index 057cd7e..9efa0bc 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -104,6 +104,7 @@ body can access to the local environment through the variable env" (ls-compile pred env) (ls-compile-sexps body env))) +;;; aritmetic primitives (define-compilation + (x y) (concat "((" (ls-compile x env) ") + (" (ls-compile y env) "))")) @@ -116,6 +117,9 @@ body can access to the local environment through the variable env" (define-compilation / (x y) (concat "((" (ls-compile x env) ") / (" (ls-compile y env) "))")) +(define-compilation = (x y) + (concat "((" (ls-compile x env) ") == (" (ls-compile y env) "))")) + (defparameter *env* '()) (defparameter *env-fun* '()) diff --git a/test.lisp b/test.lisp index 75ae829..286c7f1 100644 --- a/test.lisp +++ b/test.lisp @@ -4,3 +4,4 @@ (debug "hola") (debug (if 2 (+ 2 1) 0)) +(debug (= (+ 2 1) (- 4 1)))