aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-16 05:50:37 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-16 05:50:37 +0000
commitcf37c5138205fd23e94e51a099a8d7735651ca8f (patch)
tree35b41cc896a89bfd131a55e0fe0a45e19412fcac /src/algebra
parentf2ed2477feacf51988c6bfd96b487d7261267a28 (diff)
downloadopen-axiom-cf37c5138205fd23e94e51a099a8d7735651ca8f.tar.gz
Fix SF/1850071
* algebra/syntax.spad (compound?$Syntax): New.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/syntax.spad6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/algebra/syntax.spad b/src/algebra/syntax.spad
index d07bad13..5058dcb6 100644
--- a/src/algebra/syntax.spad
+++ b/src/algebra/syntax.spad
@@ -111,6 +111,9 @@ Syntax(): Public == Private where
getOperands: % -> List %
++ getOperands(x) returns the list of operands to the operator in `x'.
+ compound?: % -> Boolean
+ ++ compound? x is true when not an atomic syntax.
+
_case: (%, [|Integer|]) -> Boolean
++ x case Integer is true is x really is an Integer
@@ -208,6 +211,9 @@ Syntax(): Public == Private where
float? op => float op
string? op => string op
convert op
+
+ compound? x ==
+ pair? rep x
getOperands x ==
s := rep x