ForNext
Only Do What Only You Can Do
083. match catchall
VBScript
JScript
Perl
PHP
Python
Ruby
PowerShell
Scala
val c : Color = Green c match { case Red => "red"; case _ => "not red" }
F#
OCaml
let to_s c = match c with Red -> "red" | _ -> "not red";; to_s Green;;
Haskell
c = Green case c of Red -> "red"; _ -> "not red"