diff --git a/examples/hanoi.v b/examples/hanoi.v index a97c4da0a6..0851ba0dd3 100644 --- a/examples/hanoi.v +++ b/examples/hanoi.v @@ -7,12 +7,11 @@ fn main() { hanoi(num, 'A', 'B', 'C') } -fn move(n int, a string, b string) int { +fn move(n int, a string, b string) { println('Disc $n from $a to ${b}...') - return 0 } -fn hanoi(n int, a string, b string, c string) int { +fn hanoi(n int, a string, b string, c string) { if n == 1 { move(1, a, c) } else { @@ -20,5 +19,4 @@ fn hanoi(n int, a string, b string, c string) int { move(n, a, c) hanoi(n - 1, b, a, c) } - return 0 }