Skip to content

Instantly share code, notes, and snippets.

@hbbio
Created September 27, 2012 12:30
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 hbbio/3793742 to your computer and use it in GitHub Desktop.
Save hbbio/3793742 to your computer and use it in GitHub Desktop.
pp = function(x) { Debug.jlog("{x}")}
type material = { wood } or { plastic } or { metal } // or { leather }
function burns(material m) {
match (m) {
case {wood}
case {plastic}: true;
case {metal}: false;
}
}
pp(burns({wood}))
// pp(burns({leather}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment