Skip to content

Instantly share code, notes, and snippets.

@lilac
Created March 10, 2015 00:27
Show Gist options
  • Save lilac/b8b0034dea3b1aeec1bf to your computer and use it in GitHub Desktop.
Save lilac/b8b0034dea3b1aeec1bf to your computer and use it in GitHub Desktop.
Implement heterogeneous collection by lazy types.
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