aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/syntax.spad
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/syntax.spad')
-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