Skip to content

Add multi-stream zip operator #324

Closed

Description

@coffeemug

We should rename existing zip operator to flatten (I'll add a separate issue for it), and add a multi-stream zip operator as follows:

zip([1, 2], [3, 4], lambda x, y: [x, y]) ==> [[1, 3], [2, 4]]

Activity

  1. mlucy commented on Feb 13, 2013

    @mlucy
    Member

    This looks like a map operator.

  2. jdoliner commented on Feb 13, 2013

    @jdoliner
    Contributor

    Actually this looks like zipWith. I think zip should just automatically make tuples and then you can pass a function to zipWith

  3. coffeemug commented on Feb 13, 2013

    @coffeemug
    ContributorAuthor

    Since we allow optional arguments, we can just call it zip and have a default mapping that makes tuples.

  4. mlucy commented on Feb 14, 2013

    @mlucy
    Member

    To be clear, I think that we should just let map take multiple streams and an n-ary function where n is the number of streams.

  5. coffeemug commented on Feb 14, 2013

    @coffeemug
    ContributorAuthor

    I think that depends on whether we adopt the rule that ops dealing with multiple streams should work via a prefix notation. If we do, zip would make more sense, if we don't, map would make more sense. Personally I think we should adopt that philosophy (it seems cleaner to me), which would imply keeping zip and map separate.

  6. srh commented on May 16, 2017

    @srh
    Contributor

    map is now multi-stream. Closing.

  7. modified the milestones: outdated, backlog on May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions