mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: remove unused return types in hanoi.v (#10661)
This commit is contained in:
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
Block a user