
13 Jul
2010
13 Jul
'10
5:06 a.m.
Hi Vadali,
On Tue, Jul 13, 2010 at 10:58 AM, vadali
hello, iam really new to haskell,
i want to define a function which takes as a parameter a list which can contain other lists, eg. [1,[2,3],[4,[5,6]]]
how would i define a function that can iterate through the items so (in this example) iter1 = 1 iter2 = [2,3] iter3 = [4,[5,6]]
?
( can i do that without using the Tree data type?
No, a list contains a homogeneous sequence of values (i.e. a sequence of values of the same type). If you explain what you're trying to achieve we might be able to offer you better help. Cheers, Johan