Skip to content

Implement transform.distribute() #74

@Smoren

Description

@Smoren

Distribute the elements of the iterable evenly into n smaller iterables. Ex: ([1, 2, 3, 4], 2) => [1, 3], [2, 4]

function *distribute<T>(data: Iterable<T> | Iterator<T>, n: number): Iterable<Array<T>>

Needs to be implemented:

  • transform.distribute()
  • transform.distributeAsync()
  • Stream.distribute()
  • AsyncStream.distribute()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions