1
0
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:
Michiel Vlootman 2021-07-04 16:34:58 +02:00 committed by GitHub
parent 6a64259527
commit 452c8e14d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}