summaryrefslogtreecommitdiffstats
path: root/tests/smoke/fact
diff options
context:
space:
mode:
authorYevhenii Shapovalov <yshapova@redhat.com>2017-12-04 12:22:37 +0200
committerYevhenii Shapovalov <yshapova@redhat.com>2017-12-04 12:22:37 +0200
commitd6756de9ebf5840b9886c86635319dc1be1e36cc (patch)
treec270d9f54a2db3e24fd7aa4672645e78efab6910 /tests/smoke/fact
parent2e1753128fef7e6f97f1a37ad9ff93864840f045 (diff)
downloadguile-add_tests.tar.gz
guile-add_tests.tar.xz
guile-add_tests.zip
add testsHEADadd_tests
Diffstat (limited to 'tests/smoke/fact')
-rw-r--r--tests/smoke/fact6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/smoke/fact b/tests/smoke/fact
new file mode 100644
index 0000000..245737e
--- /dev/null
+++ b/tests/smoke/fact
@@ -0,0 +1,6 @@
+(define (fact n)
+ (if (zero? n) 1
+ (* n (fact (- n 1)))))
+
+(display (fact 12))
+(newline)