Created
March 15, 2015 18:46
-
-
Save gsg/136b64e2fa0b38862999 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
type _ t = | |
| IntLit : int -> int t | |
| BoolLit : bool -> bool t;; | |
let eval : type a . a t -> (a * a) list = | |
fun term -> | |
List.map (fun x -> x, x) ((match term with | |
| IntLit x -> [x] | |
| BoolLit x -> [x]) : a list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment