Skip to content

UnusedVariable warning in Point3D pattern matching example (depth function) 1.5.1. Pattern Matching #298

Description

@Skynetplus0

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.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions