Skip to content

§13.3 names an iterator operation drop(n) while §18.2 makes drop(value) an ambient prelude form: one name, two meanings #2961

Closed

Description

@ehartford

Errata #2955 item 5. The §13.3 table (docs/spec/stdlib/collection-operations.md) has drop(n) "Skip first n" beside take(n); §18.2 lists drop among the ambient prelude names, meaning release this value now. xs |> drop(2) compiles today, so a reader meets both meanings in one program. Options: rename the adapter (skip(n): Rust, Kotlin, C# LINQ; Haskell and Scala use drop) or rename the prelude form. Eric's ruling; the rename is mechanical afterwards.

Activity

  1. ehartford commented on Nov 2, 2026

    @ehartford
    ContributorAuthor

    D186: ruled (spec v7.35, #2970): the adapter is skip(n) (and skip_while); drop(value) stays the prelude's. Implementation next.

  2. ehartford commented on Nov 2, 2026

    @ehartford
    ContributorAuthor

    Done in #2971: the adapter is skip(n)/skip_while (D186).

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions