[Haskell-cafe] Re: [Haskell] How to define tail function for Even/Odd GADT lists?

Henning Thielemann lemming at henning-thielemann.de
Thu Apr 24 04:21:36 EDT 2008


On Wed, 23 Apr 2008, Iavor Diatchki wrote:

> Hello,
> I am not sure of the use case here but you could also do the following:
>
> data EvenList a = Nil
>                | ConsE a (OddList a)
>
> data OddList a  = ConsO a (EvenList a)

Or just use:
   http://darcs.haskell.org/event-list/src/Data/AlternatingList/List/


More information about the Haskell-Cafe mailing list