Paul Hudak wrote:
> I'm not sure whether your program is correct, but it's easy to see why
> you're getting the type error. You define p(_, k) = empty k, but empty
> has type BinTree t -> Bool, so clearly p has type (a, BinTree t) ->
> Bool. However, you use p in "until p f ([], Push CreateStac
I'm not sure whether your program is correct, but it's easy to see why
you're getting the type error. You define p(_, k) = empty k, but empty
has type BinTree t -> Bool, so clearly p has type (a, BinTree t) ->
Bool. However, you use p in "until p f ([], Push CreateStack b)".
Since until has typ
Hi!
I hope you can help me with this little problem I have:
I'm trying to implement a depth-first search on a binary tree from a
school book but somehow I always get Haskell error messages (more after
the source code).
The source is as follows:
-- Binary Tree structure
data BinTree t = EmptyTree