-
-
Save bitraten/5226607e04d6fd7e45f4 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
datatype_new ('k, 'v) trie = Trie "'v option" "('k, ('k, 'v) trie) alist" | |
(* Cannot define empty datatype *) | |
codatatype ('k, 'v) trie' = Trie "'v option" "('k, ('k, 'v) trie') alist" | |
datatype_new ('k, 'v) trie'' = Empty | Trie "'v option" "('k, ('k, 'v) trie'') alist" | |
datatype_new ('k, 'v) trie''' = Trie "'v option" "('k * ('k, 'v) trie''') list" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment