Re: [fricas-devel] Re: Programming with BTREEs.
Martin Rubey <[email protected]> 07 Apr 2009 14:37:17 +0200
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Ralf, I'm extremely grateful that you answered... Ralf Hemmecke <[email protected]> writes: N := Union(Symbol, List Integer) BT := BinaryTree N B ==> binaryTree -- the 3-argument version V ==> binaryTree -- the 1-argument version bt:BT:=B(V e,[5,1],B(B(V a,[1,1],V b),[1,1],B(V c,[1,2],V d))) [...] S==>Symbol L==>List Integer construct(x: S, l: L, y: S): BT == binaryTree(V(x::N), l::N, V(y::N)) bt2: BT := [e,[5,1],[[a,[1,1],b],[1,1],[c,[1,2],d]]] ['a, [1,3], 'b]@BT works for me but [e,[5,1],[[a,[1,1],b],[1,1],[c,[1,2],d]]]@BT cannot work, I think, because the argument types don't match. You will need to allow also binary trees. Martin