[Haskell-cafe] Re: Generalizing zip

2006-11-17 Thread Jón Fairbairn
Jón Fairbairn <[EMAIL PROTECTED]> writes: > "Jason Dagit" <[EMAIL PROTECTED]> writes: > > > Well, this is basically just a zip with a special base case. But you > > [...] > I wonder if there is mileage to be had from persuing > something like this, rather different (off top of head, very > provi

[Haskell-cafe] Re: Generalizing zip

2006-11-16 Thread Jón Fairbairn
"Jason Dagit" <[EMAIL PROTECTED]> writes: > Well, this is basically just a zip with a special base case. But you > can't just write it with zipWith because zipWith stops when it exausts > either list. > > How about we define zipWith'' like this: > zipWith'' _ [] _ l _ = [l] > zipWith''