Skip to content

§13.3 zip(Iter[U]), chain(Iter[T]), zip_with(Iter[U], …) force ys.iter() at the call; for takes any iterable, these should too #2962

Closed

Description

@ehartford

Errata #2955 item 6. Verified 2026-11-02: xs |> zip(ys) with ys: List[str] is refused ("type 'List[str]' does not implement trait 'Iter' required by bound 'R: Iter'"); xs |> zip(ys.iter()) passes. The compiler follows the table's signature exactly, so the signature is the ceremony: a .iter() the compiler could insert (Law 1). Proposal: the three take impl IntoIter[U], as await_all already does (lib/std/task.w) and as for does. Spec table and lib/std change together.

Activity

  1. added
    ceremony
    on Nov 2, 2026
  2. ehartford commented on Nov 2, 2026

    @ehartford
    ContributorAuthor

    D186 (delegated, spec v7.35, #2970): zip, chain, zip_with take impl IntoIter. Implementation next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ceremonylanguage-designspec

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions