[Haskell-cafe] Re: Why is this strict in its arguments?

Aaron Denney wnoise at ofb.net
Tue Dec 4 19:16:36 EST 2007


On 2007-12-04, Paulo J. Matos <pocm at soton.ac.uk> wrote:
> Hello all,
>
> As you might have possibly read in some previous blog posts:
> http://users.ecs.soton.ac.uk/pocm06r/fpsig/?p=10
> http://users.ecs.soton.ac.uk/pocm06r/fpsig/?p=11
>
> we (the FPSIG group) defined:
> data BTree a = Leaf a
>                    | Branch (BTree a) a (BTree a)

Totally avoiding your question, but I'm curious as to why you
deliberately exclude empty trees.

Come to think of it, how can you represent a tree with two elements?

Wouldn't 

> data BTree a = Empty
>              | Branch (BTree a) a (BTree a)

be better?

-- 
Aaron Denney
-><-



More information about the Haskell-Cafe mailing list