[Haskell-beginners] reorganizing lists

Bryce Verdier bryceverdier at gmail.com
Mon Jan 28 20:51:58 CET 2013


On 01/28/2013 11:24 AM, Brent Yorgey wrote:
> On Mon, Jan 28, 2013 at 10:37:53AM -0800, Bryce Verdier wrote:
>> Hi All,
>>
>> At the moment I have a list of lists. The inner list is a coordinate,
>> like (x,y) but is [x,y] instead. What I would like to do is group all
>> the x's into one list, and the y's into another. I know I can do this
>> with calling 2 maps on the container, but I would also like to do
>> this in one iteration.
> This can be done using the 'transpose' function from Data.List.
>
> -Brent
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

That was exactly what I was looking for. Thank you Brent!

Bryce



More information about the Beginners mailing list