Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrechtel/9539487 to your computer and use it in GitHub Desktop.
Save jbrechtel/9539487 to your computer and use it in GitHub Desktop.
module james
let rec fib = function
| 0 -> 0
| 1 -> 1
| n -> fib(n - 1) + fib(n - 2)
type Thing =
| Something = 1
| Otherthing = 2
let trans x = match x with
| Thing.Something -> "hello"
| Thing.Otherthing -> "goodbye"
let v = trans Thing.Something
printf "%s" v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment