3 ms·
Haskell provides functions like zip, zip2 and zip3 where an ordinary language just gives you a single zip that works with any number of arguments. That's the k
by kazinator 12y ago
Haskell provides functions like zip, zip2 and zip3 where an ordinary language just gives you a single zip that works with any number of arguments.
That's the kind of thing you do in C. For instance Unix: dup, dup2. (Linux adds dup3!)
That doesn't pass the "smell test", relative to all the claims about how Haskell and its ilk are the most amazing thing since sliced bread.
- codygman 12y agoPolyvariadic functions are possible in Haskell: http://okmij.org/ftp/Haskell/polyvariadic.html#polyvar-fn http://okmij.org/ftp/Haskell/polyvariadic.html#polyvar-fn
- kazinator 12y agoWhile this establishes existence, it seems way too cumbersome for production use. Both creating a variadic function and calling it require awkward boiler-plate, like the verbose and cryptic signature on use_build.