Skip to content

Change tee or add a new tee that provides the copy iterator into a new scope #50

@cjrh

Description

@cjrh

Perhaps something like:

(
  Iter.open(filename)
  .tee(
      # This is the second iterator, provided to a callable
      lambda it: (
        it
        .map(str.lower)
        .write_to_file("lower.txt")
      )
  )
  # This continues with the original lines iterator
  .map(str.upper)
  .write_to_file("upper.txt")
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions