Skip to content

Instantly share code, notes, and snippets.

@dgfitch
Created May 17, 2010 14:32
Show Gist options
  • Save dgfitch/403829 to your computer and use it in GitHub Desktop.
Save dgfitch/403829 to your computer and use it in GitHub Desktop.
let awesome (x:string) =
if x.Contains "awesome" then
5
else
0
(* everything is fine so far... *)
let mutable guyFuckedUp = false
let awesome2 (x:string) =
if x.Contains "awesome" then
5 (* This expression should have type 'unit', but has type 'int' *)
guyFuckedUp <- true
else
0 (* This expression was expected to have type 'unit' but here has type 'int' *)
(* clearly guyFuckedUp *)
let ifyouhaveto (x:string) =
if x.Contains "awesome" then
guyFuckedUp <- true
5
else
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment