Pattern Matching

Comprehensive guide to Pattern Matching in Linea

Pattern Matching (Preview)

Pattern matching docs are kept minimal because the feature is still preview-stage. Use conditionals in production.

Recommended Production Alternative

var status @ str = "ok"

if status == "ok" {
    display "All systems nominal"
} else if status == "warn" {
    display "Investigate warning"
} else {
    display "Failure state"
}

Preview Guidance

When experimenting with match syntax, keep fallback branches explicit and test behavior in examples before relying on it.