Skip to content

Commit 01343f1

Browse files
committed
Explain what a factorial is and link to wikipedia for more details
1 parent 69021e1 commit 01343f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

exercises/18_iterators/iterators4.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
fn factorial(num: u64) -> u64 {
2-
// TODO: Complete this function to return the factorial of `num`.
2+
// TODO: Complete this function to return the factorial of `num` which is
3+
// defined as `1 * 2 * 3 * … * num`.
4+
// https://en.wikipedia.org/wiki/Factorial
5+
//
36
// Do not use:
47
// - early returns (using the `return` keyword explicitly)
58
// Try not to use:

0 commit comments

Comments
 (0)