From 8b9d8bc717c7b1ba1aa324b6ef98682707ac13ee Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Tue, 1 Apr 2008 08:18:01 +0000 Subject: [PATCH] Relocated the definitions for the 1+ and 1- psmacros with the other math functions. --- src/lib/ps-macro-lib.lisp | 2 ++ src/special-forms.lisp | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/ps-macro-lib.lisp b/src/lib/ps-macro-lib.lisp index f1f73f0..a38b4e8 100644 --- a/src/lib/ps-macro-lib.lisp +++ b/src/lib/ps-macro-lib.lisp @@ -29,6 +29,8 @@ (asinh (n) `((lambda (x) (return (log (+ x (sqrt (1+ (* x x))))))) ,n)) (acosh (n) `((lambda (x) (return (* 2 (log (+ (sqrt (/ (1+ x) 2)) (sqrt (/ (1- x) 2))))))) ,n)) (atanh (n) `((lambda (x) (return (/ (- (log (+ 1 x)) (log (- 1 x))) 2))) ,n)) + (1+ (n) `(+ ,n 1)) + (1- (n) `(- ,n 1)) (abs (n) `(*math.abs ,n)) (evenp (n) `(not (oddp ,n))) (oddp (n) `(% ,n 2)) diff --git a/src/special-forms.lisp b/src/special-forms.lisp index e07d331..26f787c 100644 --- a/src/special-forms.lisp +++ b/src/special-forms.lisp @@ -108,12 +108,6 @@ (declare (ignore expecting)) (list 'unary-operator "~" (compile-parenscript-form x :expecting :expression) :prefix t)) -(defpsmacro 1- (form) - `(- ,form 1)) - -(defpsmacro 1+ (form) - `(+ ,form 1)) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; control structures (defun flatten-blocks (body) -- 2.20.1