aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAdrian Kummerlaender2017-04-15 13:40:17 +0200
committerAdrian Kummerlaender2017-04-15 13:41:02 +0200
commit5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9 (patch)
tree63b4e357a2e9db35f65f9b4d43ca9f8639ce0613 /README.md
parentc6d2b259a4f253403929f6f1104395a6a71b1be6 (diff)
downloadslang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar.gz
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar.bz2
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar.lz
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar.xz
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.tar.zst
slang-5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9.zip
Add README.md, example
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..83cb867
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+# slang
+
+…a experimental Forth-like stack language implemented in D.
+
+## Example
+
+ 1 i $
+ § incr dup @ 1 + swp $ ;
+ § print @ . pop ;
+ § withinBounds @ 10 < ;
+ § loop i withinBounds if i print i incr loop then else ;
+ loop
+
+The above _slang_ code to be entered in the repl prints the numbers from 1 to 9. The repl may be compiled and executed using `dub run` in the project directory.