Skip to content

Instantly share code, notes, and snippets.

@katelynsills
Last active November 5, 2019 22:33
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 katelynsills/f2637f17b56719d250e41a0b588f6944 to your computer and use it in GitHub Desktop.
Save katelynsills/f2637f17b56719d250e41a0b588f6944 to your computer and use it in GitHub Desktop.
natExtentOps
const makeNatExtentOps = () => {
insistKind: Nat,
empty: _ => 0,
isEmpty: nat => nat === 0,
includes: (whole, part) => whole >= part,
equals: (left, right) => left === right,
with: (left, right) => Nat(left + right),
without: (whole, part) => Nat(whole - part),
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment