ZVON > References > Haskell reference
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: Prelude
Function: zipWith3
Type: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
Description: makes a list, its elements are calculated from the function and the elements of input lists occuring at the same position in all three lists
Related: unzip, unzip3, zip, zip3, zipWith

Example 1

Input: zipWith3 (enumFromThenTo) [1,2,3] [3,5,7] [5,10,15]

Output: [[1,3,5],[2,5,8],[3,7,11,15]]

Example 2

Input: zipWith3 (\x y z -> x+2*y+3*z) [1..5][5..10][10..15]

Output: [41,47,53,59,65]