[Haskell-beginners] A problem about Haskell 99 questions
Arlen Cuss
celtic at sairyx.org
Tue May 17 12:00:40 CEST 2011
On Tue, 2011-05-17 at 17:51 +0800, amazingjxq wrote:
> In problem 7, the example in haskell is below:
>
> *Main> flatten (Elem 5)
> [5]
> *Main> flatten (List [Elem 1, List [Elem 2, List [Elem 3, Elem 4], Elem 5]])
> [1,2,3,4,5]
> *Main> flatten (List [])
> []
> What are the functions List and Elem? I cann't hoogle it.
Those would be type constructors for the aforementioned "nested list
structure." I'm not sure if defining that type is part of the problem,
so I won't give it away!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110517/e2ce9b48/attachment.pgp>
More information about the Beginners
mailing list