diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-08-02 01:20:12 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-09-25 02:40:23 +0200 |
| commit | 288727f09a1b3458c268497d111349e608c3f9fa (patch) | |
| tree | d62565249fa3c7127856c65405752572fc41aca9 /docs/examples.rst | |
Diffstat (limited to 'docs/examples.rst')
| -rw-r--r-- | docs/examples.rst | 20 |
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 |
