data BinTree a = Nil | Node a (BinTree a) (BinTree a)

inorder2 :: BinTree a -> [a] -> [a]
inorder2 Nil xs = []
inorder2 (Node val b1 b2) xs = (inorder2 b1 (val:(inorder2 b2 (xs))))

I want to be able to traverse across the binary tree in order and that is what I have so far.
But somehow it always return []. it seems to ignore the "val:"


Y. C.
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to