aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/aggcat.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/aggcat.spad.pamphlet')
-rw-r--r--src/algebra/aggcat.spad.pamphlet2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 3d0e1e14..ab9eb619 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -2353,6 +2353,8 @@ ListAggregate(S:Type): Category == Join(StreamAggregate S,
empty? p => q
empty? q => p
eq?(p, q) => error "cannot merge a list into itself"
+ r: %
+ t: %
if f(first p, first q)
then (r := t := p; p := rest p)
else (r := t := q; q := rest q)