Skip to content

Instantly share code, notes, and snippets.

@rsms
Created April 24, 2015 18:06
Show Gist options
  • Save rsms/4a15192f62cbee407e29 to your computer and use it in GitHub Desktop.
Save rsms/4a15192f62cbee407e29 to your computer and use it in GitHub Desktop.
animal = { type: "an animal",
toString: ^{ "I'm " + @type }
}
cat = create animal, { type: "furry" }
print "Cat: " + cat # --> "Cat: I'm furry"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment