[Haskell-cafe] Parse text difficulty

Jan-Willem Maessen - Sun Labs East Janwillem.Maessen at Sun.COM
Thu Dec 9 10:02:39 EST 2004


Keith Wansbrough wrote:
> zip stops when it reaches the end of the shorter list, so you can just say
> 
>   zip [1 ..] lines
> 
> In fact, most programmers use the infix version of zip, like this:
> 
>   [1..] `zip` lines
> 
> which is nicely readable.  (any function can be turned into an infix by surrounding it in `backticks`).

And I thought that most programmers used "zipWith", which has to be
prefix.

Proving that I so rarely want lists of pairs,

-Jan-Willem Maessen



More information about the Haskell-Cafe mailing list