Created
March 4, 2015 20:42
-
-
Save k33g/583cf5f9d7b45a07ecac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augmentedStruct human = { | |
fields = { | |
firstName, | |
lastName | |
} | |
methods = { | |
function hello = |this| { | |
println("hello") | |
} | |
function ctor = |this, first, last| { | |
this: firstName(first) | |
this: lastName(last) | |
return this | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use case for macros :-)