Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let twice = fn(f, x) {
- return f(f(x));
- };
- let addTwo = fn(x) {
- return x + 2;
- };
- twice(addTwo, 2);
- let unless = macro(condition, consequence, alternative) {
- quote(if (!(unquote(condition))) {
- unquote(consequence);
- } else {
- unquote(alternative);
- });
- };
- unless(10 > 5, puts("not greater"), puts("greater"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement