~fd/cane-lang

ff8ebb0513400ae94413068a75cdb40be473ce06 — Ersei Saggi 10 months ago e8949b4
Update sample in README to use println instead of print, ignore
srht.site data
2 files changed, 12 insertions(+), 9 deletions(-)

M .gitignore
M README.md
M .gitignore => .gitignore +3 -0
@@ 1,2 1,5 @@
/target
/Cargo.lock

# For srht.site
site.tar.gz

M README.md => README.md +9 -9
@@ 13,7 13,7 @@ A funky programming language made in 24(ish) hours
```
; Simple "Hello, world!" program ~

(`hello, ' `world\n' add print)
(`hello, world' add println)
```

```


@@ 23,17 23,17 @@ You need: the data, and a string as a name.
~

((1 2 3 4 add) `myvarname' defvar)
(myvarname `\n' print)
(myvarname `\n' print)
(myvarname `\n' print)
(myvarname `\n' print)
(myvarname println)
(myvarname println)
(myvarname println)
(myvarname println)

; All variables are immutable! You can replace the variable, but you can't edit it. ~

((1 2 3 4/3 add) `myvarname' defvar)
(myvarname `\n' print)
(myvarname println)
((1 2 3 4 5 add) `myvarname' defvar)
(myvarname `\n' print)
(myvarname println)
```

```


@@ 55,7 55,7 @@ through the `args' variable
(
	[(counter 100 
		[
			(counter `\n' print)
			(counter println)
			(1 counter add `counter' defvar)
			(body)
		]


@@ 71,7 71,7 @@ through the `args' variable
(1 `count' defvar)
(
	[
		(count `\n' print)
		(count println)
		(count 1 add `count' defvar)
	]
	1000000 repeat