examples: remove unused return types in hanoi.v (#10661)

pull/10665/head
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
1 changed files with 2 additions and 4 deletions

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
}