code_junkie

F# keyword 'Some'

Nov 13th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. type 'a option =
  2. | None
  3. | Some of 'a
  4.  
  5. let stringRepresentationOfSomeObject (x : 'a option) =
  6. match x with
  7. | None -> "NONE!"
  8. | Some(t) -> t.ToString()
Add Comment
Please, Sign In to add comment