src/Tools/SML/factorial.sml
author wenzelm
Sat, 22 Aug 2020 14:56:33 +0200
changeset 72191 d436ba9ac9aa
parent 56276 9e2d5e3debd3
permissions -rw-r--r--
proper treatment of timeout: <= 0 means already timed out, but for $KODKODI/bin/kodkodi it would mean NO timeout;

fun factorial 0 = 1
  | factorial n = n * factorial (n - 1);

factorial 10;
factorial 100;
factorial 1000;