lazix

basic_matching.fsx

Nov 19th, 2020
288
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Learning F# a bit, decided to test out if it has Haskell-Like pattern matching
  2. let patternmatch =
  3.    let x = 'a'
  4.    match x with
  5.     | 'a' -> printfn "x is a"
  6.     | 'b' -> printfn "x is b"
  7.     | _ -> printfn "x is n"
  8.  
RAW Paste Data