[Haskell-cafe] Finite but not fixed length...

Jonas Almström Duregård jonas.duregard at chalmers.se
Wed Oct 13 11:35:33 EDT 2010


>Why do you have the S in the return type of Finite.++ ?

Typo. Plus is sufficient.

What I would really like is a nice way of implementing concat (i.e.
concatenate a finite number of finite lists, of various "sizes", into a
single finite list).

/J

2010/10/13 Ozgur Akgun <ozgurakgun at gmail.com>

> Jonas,
>
> 2010/10/13 Jonas Almström Duregård <jonas.duregard at chalmers.se>
>
> (++) :: Finite s1 a -> Finite s2 a -> Finite (S (Plus s1 s2)) a
>> (++) (Finite a) (Finite b) = Finite $ a Prelude.++ b
>> infixr 5 ++
>
>
> Why do you have the S in the return type of Finite.++ ?
>
> Ozgur
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20101013/59e4587a/attachment.html


More information about the Haskell-Cafe mailing list