aboutsummaryrefslogtreecommitdiff
path: root/docs/examples.rst
blob: 7905ef4c690786a1a3d009c24a8e8cfc40fbb7cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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