leanprover / leanprover/fp-lean
UnusedVariable warning in Point3D pattern matching example (depth function) 1.5.1. Pattern Matching
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 192
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
In the section 1.5.1. covering structures and pattern matching, the definition for depth binds unused variables (h and w), triggering a Lean 4 linter warning (UnusedVariables)
Code:
```lean def depth (p : Point3D) : Float := match p with | { x := h, y := w, z := d } => d
There maybe, the unused variables can be written with an underscore, like _h and _w.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the section 1.5.1 pattern-matching example containing the depth definition for Point3D. Check the example with the Lean 4 linter, update the unused h and w bindings as described, and confirm the UnusedVariables warning is gone.
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
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100