Created
March 10, 2015 00:27
-
-
Save lilac/b8b0034dea3b1aeec1bf to your computer and use it in GitHub Desktop.
Implement heterogeneous collection by lazy types.
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 'a lazy = unit -> 'a | |
val defer : 'a -> ('a -> 'b) -> 'b lazy | |
fun defer a f = fn () => f a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment