/consistent.nim Secret
Last active
August 29, 2015 13:56
-
-
Save ReneSac/02076a8ed3cfc4d559c3 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
| let # let | |
| x = 5 # x equal 5 | |
| type # type | |
| Foo = int # `Foo` equals `int` | |
| Bar = object # `Bar` equals object | |
| field: Foo # With field `field` of type `Foo` | |
| proc foo: int = 5 # procedure `foo` of type `int` equals 5 | |
| var x: int = 2 # variable `x` of type `int` equals 2 | |
| proc bar: int = | |
| 10 # procedure `bar` of type `int` equals 10 | |
| var y: int = | |
| 4 # variable `y` of type `int` equals 4 | |
| proc boo: int = ( # what is already possible, if you respect indentation rules | |
| let a = 3; # but you can't nest (;), so it is not very useful for that. | |
| echo a; | |
| return a | |
| ) | |
| echo boo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment