-
-
Save ozten/8fa2f35d400e38b528dd 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
macro def { | |
rule { | |
$name:ident ( $($params:ident : $type:ident) (,) ...) $body | |
} => { | |
// just throwing away the type annotation. The semantics of type | |
// annotations left as an exercise to the reader :) | |
function $name ($params (,) ...) $body | |
} | |
} | |
def add (a : Number, b : Number) { | |
return a + b; | |
} | |
add(1,2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment