about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-03-14 01:25:34 -0700
committerKartik Agaram <vc@akkartik.com>2020-03-14 01:25:34 -0700
commit6db056110bc9bab90092b29908085a9befd5956e (patch)
treec1ceacd04766cb12e60cd0c11d8547d7d4529e93 /apps
parent9428990bd6e61988df23811205504a5c63a348e1 (diff)
downloadmu-6db056110bc9bab90092b29908085a9befd5956e.tar.gz
6144
Diffstat (limited to 'apps')
-rw-r--r--apps/factorial.mu14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu
index 722c9e6c..83b2bedf 100644
--- a/apps/factorial.mu
+++ b/apps/factorial.mu
@@ -1,7 +1,13 @@
-# usage:
-#   ./translate_mu apps/factorial.mu
-#   ./a.elf test  # to run tests
-#   ./a.elf       # to run factorial(5)
+# compute the factorial of 5, and return the result in the exit code
+#
+# To run:
+#   $ ./translate_mu apps/factorial.mu
+#   $ ./a.elf
+#   $ echo $?
+#   120
+#
+# You can also run the automated test suite:
+#   $ ./a.elf test
 #
 # Compare apps/factorial4.subx