[haXe] Binary Tree?
Franco Ponticelli
franco.ponticelli at gmail.com
Wed Aug 15 12:55:23 CEST 2007
Or an enum?
enum BinTree<T> {
Node(v: T, lft : BinTree<T>, rgt : BinTree<T>);
Leaf(v: T);
}
On 8/15/07, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
>
> Michael Norton a écrit :
> > hi,
> >
> > How do you construct a binary tree using HaXe?
> >
> > thanks.
> >
> > Mike
>
> For example by using a typedef :
>
> typedef BinTree<T> = {
> var value : T;
> var left : BinTree<T>;
> var right : BinTree<T>;
> }
>
> Nicolas
>
> --
> haXe - an open source web programming language
> http://haxe.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/haxe/attachments/20070815/1c75e1c1/attachment.htm
More information about the Haxe
mailing list