Created
December 8, 2013 21:49
-
-
Save Glorp/7864252 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 nat = z | s of nat | |
fun fold _ zv z = zv | |
| fold sf zv (s n) = sf (fold sf zv n) | |
fun pz _ = z | |
fun ps g h = h (g s) | |
fun id x = x | |
fun p n = (fold ps pz n) id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment