Skip to content

Conversation

@kborucinski
Copy link
Contributor

Add zipN method which zips given arrays

import zipN from "./zipN.ts";

describe("zip", () => {
it("should zips with pair constructor", () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zips => zip ?

export default (...xs) => {
const [head, ...tail] = xs;

return head.map((value, index) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail for the case zipN() - please guard against it and cover it with tests.

@przemyslawzalewski przemyslawzalewski merged commit cab86fd into master Jan 9, 2020
@przemyslawzalewski przemyslawzalewski deleted the add_zip_n_method branch January 9, 2020 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants