| 1 | // v doc -f html -o doc rec.v (doc should be an empty folder) |
| 2 | // I would like to see these 2 lines in HTML-generated header documentation |
| 3 | module rec |
| 4 | |
| 5 | // fib Calculates the recursive fibonacci series |
| 6 | // `n` is the rank to pass to function |
| 7 | // I See these 3 lines only |
| 8 | pub fn fib(n int) int { |
| 9 | return if n < 2 { n } else { fib(n - 1) + fib(n - 2) } |
| 10 | } |
| 11 |