Skip to content

Instantly share code, notes, and snippets.

@huonw
Forked from bblum/gist:3885017
Last active December 19, 2015 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huonw/6034302 to your computer and use it in GitHub Desktop.
Save huonw/6034302 to your computer and use it in GitHub Desktop.
trait Nat { }
struct Zero;
struct Suc<N>(N);
impl Nat for Zero { }
impl<N: Nat> Nat for Suc<N> { }
type One = Suc<Zero>;
type Two = Suc<One>;
type Three = Suc<Two>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment