diff options
| author | Andrew Lilley Brinker <alilleybrinker@gmail.com> | 2025-01-02 23:29:17 +0000 |
|---|---|---|
| committer | Andrew Lilley Brinker <alilleybrinker@gmail.com> | 2025-01-02 23:29:17 +0000 |
| commit | f454fa61fa9cc81119cbcac8a92ef5107e35a427 (patch) | |
| tree | 4f7e3f1a05c08a5e51bf27c450881b4a4449ef1c | |
| download | guileless-master.tar.gz | |
Initial commitmaster
Signed-off-by: Andrew Lilley Brinker <alilleybrinker@gmail.com>
| -rw-r--r-- | README.md | 4 | ||||
| -rwxr-xr-x | script.guile | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..8632055 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# `guileless` + +An opportunity to learn Guile Scheme. + diff --git a/script.guile b/script.guile new file mode 100755 index 0000000..28eb90b --- /dev/null +++ b/script.guile @@ -0,0 +1,10 @@ +#!/usr/local/bin/guile -s +!# + +(define (fact n) + (if (zero? n) 1 + (* n (fact (- n 1))))) + +(display (fact (string->number (cadr (command-line))))) +(newline) + |