"children binarySearchTree [1]" should return "[]" instead of "[[]]".

diff --git a/src/algebra/aggcat.spad b/src/algebra/aggcat.spad
index f960af07..b0edbde7 100644
--- a/src/algebra/aggcat.spad
+++ b/src/algebra/aggcat.spad
@@ -1168,9 +1168,10 @@ BinaryRecursiveAggregate(S : Type) : Category ==
RecursiveAggregate S with
         concat(nodes left x, concat(x, nodes right x))

     children x ==
-       l := empty()$List(%)
-       empty? x => l
-       empty? left x  => [right x]
+       empty? x => empty()
+       empty? left x =>
+           empty? right x => empty()
+           [right x]
         empty? right x => [left x]
         [left x, right x]

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to