I didn't check all possible languages, but C#, Scala, Haskell, Lisp, Python have the same zip behaviour -- one collection is longer, tail is silently ignored. Technically it could be an exception thrown as well -- but I didn't read about such approach, if I see any variations is to automatically add empty elements.
This puzzles me... does anyone know the reason why zip is designed that way? I guess for new (sort of) languages it could be done, because "it was the way it was done". But what was the root reason?
For CO fans, I am asking here factual, historic-based question -- not if somebody likes it, or not, or his/her opinion.
Aucun commentaire:
Enregistrer un commentaire