by teraflop · 4y ago · 0 comments
Python's zip function was added in PEP 201 [1], which credits the Haskell 98 report with the name. The same function appears in all prior versions of the Haskell language that I could find, dating back to Haskell 1.0 in 1990.
On the other hand, the GNU coreutils version of paste[2] has copyright dates going all the way back to 1984, which presumably means it was derived from UNIX System V or an even earlier version.
[1]: https://www.python.org/dev/peps/pep-0201/
[2]: https://github.com/coreutils/coreutils/blob/master/src/paste...
The comments refer to an "old 127 paste command" but I have no idea what that is.
Looking at it further, there are a few answers at https://minnie.tuhs.org/pipermail/tuhs/2020-January/019955.h...
> GWRL stands for Gottfried W. R. Luderer, the author of cut(1) and paste(1), probably around 1978. Those came either from PWB or USG
I can verify that neither cut nor past were in PWB 1: https://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1
> Also "127" was the internal department number for the Computer Science Research group at Bell Labs where UNIX originated
The following is included for compatibility with Bird and Wadler (1988).
The normal Miranda style is to use the curried form `zip2'.
> zip :: ([*],[**])->[(*,**)]
> zip (x,y) = zip2 x y
which suggests a slightly later origination of zip.