Merge remote-tracking branch 'refs/remotes/origin/refactoring' into refactoring
[calc.git] / calc.c
diff --git a/calc.c b/calc.c
index 6bac59e91cd662c72add8f7b263e941a132da809..7476252d1c42312ffd17042e69c0cfb3bcf0ffbc 100644 (file)
--- a/calc.c
+++ b/calc.c
@@ -412,4 +412,7 @@ int main (int argc, char *argv[])
 // Gold number
 // test: echo -e '{sto (1, 1), sto (2, 1), sto (10, 1), while (inc (10) < 15 - 1, {sto (3, rcl (1) + rcl (2)), sto (1, rcl (2)), print (sto (2, rcl (3)) / rcl (1))})};' | calc.exe | grep -q '=> 1.61803'
 
+// Factorial sequence
+// test: echo -e 'prog (1, cond (arg (1) > 1, arg (1) * call (1, arg (1) - 1), 1))\ncall (1, 10)' | calc.exe | grep -q '=> 3.6288e+06'
+
 /* vim: set ts=4 sw=4 et: */