Created
November 7, 2018 04:49
-
-
Save creationix/1eecd15f0dadfd130f4b7d82d8bcc0a6 to your computer and use it in GitHub Desktop.
This file contains 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
integer literals | |
1 -- integer | |
-5 -- integer | |
rational literals | |
1/4 -- rational | |
3.141 -- rational (syntax sugar for 3141/1000) | |
tuple literal | |
( expression* ) | |
(1 2) -- two values | |
(1) -- single value is allowed | |
() -- empty tuple is allowed too | |
code literal, does not eager eval contents, returns code block as value | |
{ code... } | |
code literal parameters | |
{ a b : a + b } | |
variable assignment | |
set add { a + b } | |
set (a b) (a b) | |
pipeline operator for passing arguments | |
(1 2) | add | |
call operator for passing arguments | |
easy iterators/loops | |
loop 5 { | |
@ | log | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment