aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/tree.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/tree.spad.pamphlet')
-rw-r--r--src/algebra/tree.spad.pamphlet6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet
index a174308e..c574d9a4 100644
--- a/src/algebra/tree.spad.pamphlet
+++ b/src/algebra/tree.spad.pamphlet
@@ -9,8 +9,12 @@
\eject
\tableofcontents
\eject
+
\section{domain TREE Tree}
+
<<domain TREE Tree>>=
+import Boolean
+import List
)abbrev domain TREE Tree
++ Author:W. H. Burge
++ Date Created:17 Feb 1992
@@ -66,7 +70,7 @@ Tree(S: SetCategory): T==C where
setvalue_!(t,s) ==
t case empty => error "cannot set value of an empty tree"
(t.node.value:=s;s)
- count(n, t) ==
+ count(n: S, t: %) ==
t case empty => 0
i := +/[count(n, c) for c in children t]
value t = n => i + 1