fun factorial (n: int): int = do case n of | 0 -> return 1; \ return n * factorial(n - 1); end; end; fun main: void = do factorial(5) |> @write(_); end;