Skip to main content

Pattern match + pipe

Exhaustiveness-checked match with ranges and guards, plus the pipe operator for left-to-right data flow.

Open in the playground (full editor) →

Walkthrough

  • match arms cover literals (0), ranges (1..10), guarded bindings (n if n > 100), and the wildcard _ — nine pattern forms in total.
  • Exhaustiveness is checked at compile time: delete the _ arm and lux check reports the gap, with the location.
  • The pipe operator |> reads left-to-right: the list flows into map(describe).