Re: [Haskell] Re: Fixed-length vectors in Haskell, Part 2: Using no extensions

2005-05-10 Thread Daan Leijen
Ashley Yakeley wrote: In article <[EMAIL PROTECTED]>, David Menendez <[EMAIL PROTECTED]> wrote: data Vec 0 a = Nil data Vec s v a = Cons a (v a) Some aliases for convenience: type Vec 1 = Vec s Vec 0 type Vec 2 = Vec s Vec 1 type Vec 3 = V

[Haskell] Re: Fixed-length vectors in Haskell, Part 2: Using no extensions

2005-05-10 Thread Ashley Yakeley
In article <[EMAIL PROTECTED]>, David Menendez <[EMAIL PROTECTED]> wrote: > > data Vec 0 a = Nil > > data Vec s v a = Cons a (v a) > > Some aliases for convenience: > > > type Vec 1 = Vec s Vec 0 > > type Vec 2 = Vec s Vec 1 > > type Vec 3 = Vec s Vec 2 > > type Vec 4 = Vec s Vec 3 I don't