zip v0.1.0 Zip protocol View Source

The Zip interface allows all sorts of operations on collections. If you squint you might see an applicative.

The collections need to have some sort of order for this interface to return stable results, so a good example is a list. The zip interface allows us, for example, to add elements from to lists together pairwise. What does pairwise mean? You take the first element in the first list, and the first element in the second list and add them together. Then the second elements in each list get added together and so on.

Example

iex> Zip.add([1, 2], [1, 2])
[2, 4]

Link to this section Summary

Link to this section Types

Link to this section Functions