aboutsummaryrefslogtreecommitdiff
path: root/docs/examples.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples.rst')
-rw-r--r--docs/examples.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/examples.rst b/docs/examples.rst
new file mode 100644
index 0000000..7905ef4
--- /dev/null
+++ b/docs/examples.rst
@@ -0,0 +1,20 @@
+Examples
+========
+
+Examples are run using interpreter build for POSIX platform. Before
+executing examples, interpreter is bootstrapped with `base-large.lsp`
+extensions.
+
+
+Factorial
+---------
+
+Simple implementation of factorials calculation.
+
+.. literalinclude:: ../examples/factorial.lsp
+ :language: scheme
+
+Example execution::
+
+ $ cat src_lsp/base-large.lsp examples/factorial.lsp | build/posix/lisp16
+ 3628800