examples: remove unused return types in hanoi.v (#10661)
parent
6a64259527
commit
452c8e14d4
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue