leanprover / leanprover/fp-lean

Section 2.1.4. `dropRightWhile` is deprecated (Combining IO Actions)

Open
#267 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lean
Stars
192
Forks
73
PR merge metrics
No merged PRs in 30d

Description

In 2. Hello, World!, 2.1.4 (Combining IO Actions)
Deprecated function (dropRightWhile) usage:

let name := input.dropRightWhile Char.isWhitespace

Compiler output:

warning: String.dropRightWhile has been deprecated: Use String.dropEndWhile instead

Note: The direct replacement, String.dropEndWhile returns a string slice instead of a string (returned by dropRightWhile). Using it would require an additional .copy call, which may be confusing and a clarification may be needed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in 2. Hello, World!, section 2.1.4, where the dropRightWhile example appears. Review the replacement's String slice behavior, update the example and clarification so the deprecated warning is addressed, and confirm the section accurately explains any needed conversion.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.