[Haskell-cafe] Why does not zipWith' exist

Kazu Yamamoto ( 山本和彦 ) kazu at iij.ad.jp
Sat Feb 2 02:40:50 CET 2013


> Right, I'm not arguing that it's impossible to produce a difference,
> but I think that if you're defining the sequence of fibs, the most
> likely scenario might be that you're actually interested in a prefix,
> and more importantly, you can still, from the outside, force the
> prefix even if you're only interested in a particular element. 

Three topics are repeatedly discussed among beginners in Japan:

1) fibs implemented with zipWith
2) simple quicksort
3) sieve of eratosthenes

Some people use 1) with "!!" and say "it's slow, why?".

Some people say 2) is not a true quicksort because it is not in-place.

Some people say 3) is not the sieve of eratosthenes at all because,
for example, 7 is divided by 5.

These three examples are mis-leading. In my opinion, if we use them,
we should

- use them as is, but describe such opinions OR
- use better implementations

I don't know translations work well but you can find such discussions
here:

	http://d.hatena.ne.jp/kazu-yamamoto/20100624
	http://d.hatena.ne.jp/nishiohirokazu/20100622/1277208908
	http://d.hatena.ne.jp/mkotha/20100623/1277286946

--Kazu



More information about the Haskell-Cafe mailing list