
17 May
2011
17 May
'11
6 a.m.
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!