Created
October 19, 2010 03:38
-
-
Save manveru/633564 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let p = function | |
| `Int i -> print_endline (string_of_int i) | |
| `Float f -> print_endline (string_of_float f) | |
| `String s -> print_endline s | |
;; | |
let upper = 42 in | |
let lower = -upper in | |
let x = 0 in | |
let y = 0 in | |
let i = 0 in | |
let ratio = float (upper + 1) in | |
p (`Int upper); | |
p (`Int lower); | |
p (`Int x); | |
p (`Int y); | |
p (`Int i); | |
p (`Float ratio) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment