Underscore.m icon indicating copy to clipboard operation
Underscore.m copied to clipboard

Added method to ZIP multiple arrays

Open isaacroldan opened this issue 11 years ago • 2 comments

Added method to zip elements passing an array of arrays that returns another array of arrays zipped. This method only works if all the sub-arrays have the same length (should i add some checks here?)

this:

@[@[@1, @2, @3], @[@4, @5, @6], @[@7, @8, @9]]

transforms into this:

@[@[@1, @4, @7], @[@2, @5, @9], @[@3, @6, @9]]

:warning: all the arrays should have the same lenght

I would like to add specs, but can't make the tests run. Always getting this error after pod install:

ld: library not found for -lPods-UnderscoreTests-Expecta
clang: error: linker command failed with exit code 1 (use -v to see invocation)

isaacroldan avatar Feb 20 '15 14:02 isaacroldan

ohh yess!

masylum avatar Feb 23 '15 10:02 masylum

If you merge in my release branch updates you should be able to get tests running. Also the development branch already has a zipWith method added. Is that the same as what you are proposing or different?

kvnify avatar Jan 22 '16 12:01 kvnify