Skip to content

Implement transform.divide() #75

@Smoren

Description

@Smoren

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

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

Needs to be implemented:

  • transform.divide()
  • transform.divideAsync()
  • Stream.divide()
  • AsyncStream.divide()

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions