Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Multi-way zip #374

@CryptoPascal31

Description

@CryptoPascal31

Is your enhancement request related to a problem? Please describe.

Yes.. There is no multi-ways (more than 2) zip in Pact.

Describe the solution you'd like

I would be happy if zip could accept more than a two arguments:
Example:

(zip (lambda (a b c) (format "{} says {} to {}" [a b c]))
       ["Pascal" "Jose"]
       ["Hello", "Good morning"]
       ["Amir", "Stuart"])

["Pascal says Hello to Amir", "Jose says Good morning to Stuart"]

Describe alternatives you've considered

Simulating N-ways zip by using existing "2-ways zip" is doable but is cumbersome and ugly.. It requires building different levels of temporary objects or list , and deconstructing them in the target function.


As always, this is only a suggestion... that should be balanced with ease of implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions