Provided by: kaya_0.4.4-6ubuntu3_amd64

**NAME**

Array::zipWith - Map a function across two arrays.

**SYNOPSIS**

[c]zipWith(c(a,b)f,[a]xs,[b]ys)

**ARGUMENTS**

fThe function to usexsThe first arrayysThe second array

**DESCRIPTION**

Returns the array created by applying functionfto every pairwise elements ofxsandysIf the arrays are of different lengths, then the resulting array will be the same size as the shorter of the two input arrays. The function must takexs[0]andys[0]to givezs[0]and so on. Int sum(Int a, Int b) { return a+b; } Void main() { xs = [1,2,3,4,5]; ys = [7,8,9]; zs = zipWith(sum,xs,ys); // zs = [8,10,12]; }

**AUTHORS**

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

**LICENSE**

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

**RELATED**

Array.map(3kaya)Array.zip(3kaya)