# 029: Pattern Matching
# Match values against patterns

status = "pending"

# Basic match
status is:
  "pending": show "Waiting..."
  "approved": show "Approved!"
  "rejected": show "Rejected"
  _: show "Unknown status"

# Match with values
score = 85

score is:
  100: show "Perfect!"
  90..99: show "Excellent"
  80..89: show "Good"
  70..79: show "Fair"
  _: show "Needs improvement"

# Match with conditions
user_type = "admin"

user_type is:
  "admin": show "Full access"
  "moderator": show "Limited access"
  "user": show "Basic access"
  _: show "No access"
