[Haskell-cafe] Interleaving type variables in a tree, has this a name ?
Chaddaï Fouché
chaddai.fouche at gmail.com
Sun Oct 14 00:34:16 CEST 2012
On Sat, Oct 13, 2012 at 11:25 PM, Eric Dedieu <papa.eric at free.fr> wrote:
> Hi Haskell Helpers,
>
> For a hobby projet to learn haskell, I'm trying to use this kind of interleaved
> tree structure (simplified):
>
>> data ANode a b = ANode a [BNode a b] [BNode a b]
>> data BNode a b = BNode b [ANode a b] [ANode a b]
Wouldn't the following work as well and be simpler to handle :
> data Node a b = Node a [Node b a] [Node b a]
--
Jedaï
More information about the Haskell-Cafe
mailing list