list comprehension of two lists

Wes James <>
Fri Jun 18 23:34:00 CEST 2010

I see how to do:

[X || X <- [1,2,3,4,5,6]]

will create [1,2,3,4,5]

but how about I have two lists, [1,2,3] and [a,b,c] and I want to output

[[1,a], [2,b], [3,c]]

can that be done with a list comprehension?



More information about the erlang-questions mailing list