def (fact n) ret result 1 for i 1 (i <= n) ++i result <- result*i