Created
January 22, 2015 13:43
-
-
Save camlspotter/4d963db5b9af8e7ddfd5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type t = | |
| Pair of t * t | |
| Number of int | |
| Function of string (* or what? *) | |
let rec empty = Pair (empty, empty) (* make a looped value *) | |
let is_empty t = match t with | |
| Pair (t1, t2) -> t == t1 && t == t2 (* using pointer equality *) | |
| _ -> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment