An n-ary zipWith in Haskell
AbstractThe aim of this note is to present an alternative definition of the
zipWith family in the Haskell Library Report . Because of the difficulties in defining a well-typed function with a variable number of arguments,  presents a family of zipWith functions. It provides zip functions zipWith2, zipWith3, . . . , zipWith7. For each n, zipWithn zips n lists with a n-ary function. Defining a single zipWith function with a variable number of arguments seems to require dependent types. Inspired by , we show, however, how to define such a function in Haskell by means of a binary operator for grouping its arguments. For comparison, we also give definitions of zipWith in languages with dependent types.
How to Cite
Fridlender, D., & Indrika, M. (1998). An n-ary zipWith in Haskell. BRICS Report Series, 5(38). https://doi.org/10.7146/brics.v5i38.19483
Articles published in DAIMI PB are licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.