mirven/underscore.lua — pull request #13 by HennyH (2014-06-01 08:59:47+00:00)
Title: zip and gzip method which works like python's itertools.zip and izip.

This branch adds the useful `zip` and `gzip` methods which are functionally equivalent of python's [itertools](https://docs.python.org/2/library/itertools.html#itertools.izip) libraries' `zip` and `izip` respectively.

For example:

```
> l = { {'a','b'}, {'c','d'} }
> r = { {1, 2}, {3, 4} }
> zipped = __.zip(l, r)
```

Results in `zipped` having:
```
{
{
{ "a", "b" }, { 1, 2 }
},
{
{ "c", "d" }, { 3, 4 }
}
}
```

And then `gzip`:

```
> for li, ri in __.gzip(l, r) do print("Recieved", inspect(li), " , ", inspect(ri)) end
Recieved { "a", "b" } , { 1, 2 }
Recieved { "c", "d" } , { 3, 4 }
```