v / cmd / tools / vdoc / testdata / comments / main.v
10 lines · 9 sloc · 348 bytes · 8eaaba6094456bb21833fddf20d22514e7dadcb2
Raw
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
3module 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
8pub fn fib(n int) int {
9 return if n < 2 { n } else { fib(n - 1) + fib(n - 2) }
10}
11