functional programming - Iterating along 2 lists at the same time in haskell (without resorting to zip) -
i have 2 lists:
[[1,2],[4,5]] and
[0, 3] and i'd turn into
[[0,1,2],[3,4,5]] i've created function that:
myfun xxs xs = map (\x -> (fst x):(snd x)) (zip xs xxs) and works. still left wondering whether there might exist better way accomplish without using zip. there any?
basically want iterate along 2 lists @ same time, can't think of way in haskell without resorting zip.
thanks
Comments
Post a Comment