Hi Vadali,

On Tue, Jul 13, 2010 at 10:58 AM, vadali <shlomivaknin@gmail.com> wrote:

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