Fix example in docs on documentation

This commit is contained in:
Derecho 2014-07-02 10:53:30 +02:00
parent 89259b34c0
commit c85d42a305

View file

@ -51,7 +51,7 @@ Calculates the factorial of a number.
Given the input integer `n`, this function will calculate `n!` and return it.
"]
pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n)} }
pub fn factorial(n: int) -> int { if n < 2 {1} else {n * factorial(n - 1)} }
# fn main() {}
~~~