(* Factorial written in Russell *) let ! == func [n : val Short] { let N == Short$New[]; F == Short$New[] in N:=2; F:=1; do N <= n ==> F:=F*N; N:=N+1 od; F ni } x == Short$New[]; in do (put["Factorial of?"]; x:=get[FS]) >= 0 ==> put[x!]; put["\n"] od ni |