Skip to content

Instantly share code, notes, and snippets.

@Ke-
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save Ke-/61aad4c4fe97b51ae9ba to your computer and use it in GitHub Desktop.

Select an option

Save Ke-/61aad4c4fe97b51ae9ba to your computer and use it in GitHub Desktop.
// Cache method result on a thread level
define whatmethod => {
return givenblock->methodname
}
define whattype => {
return givenblock->self->type
}
define test_type => type {
public apple => whatmethod => {
return 'pie'
}
public orange => whattype => {
return 'pie'
}
}
test_type->orange
'.'
test_type->apple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment