[Haskell-cafe] Simple List Question

Neil Mitchell ndmitchell at gmail.com
Sun Jul 2 10:04:30 EDT 2006


Hi


> I have a list
> >main [(1,2,3),(4,5,6),(3,4,5)]
>
> and i want all Elements at the 1. Pos.  in new List:
> >[1,4,3]

You might want to take a look at list comprehensions, they fit very
nicely for this sort of problem.

Thanks

Neil


More information about the Haskell-Cafe mailing list