docs: vfmt the function example too (fix ci)

pull/8574/head
Delyan Angelov 2021-02-05 09:30:18 +02:00
parent e5c9fcb7e9
commit 231182c3ff
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 6 additions and 3 deletions

View File

@ -1683,9 +1683,12 @@ fn main() {
})
// You can even have an array/map of functions:
fns := [sqr, cube]
println(fns[0](10)) // "100"
fns_map := { 'sqr': sqr, 'cube': cube}
println(fns_map['cube'](2)) // "8"
println((10)) // "100"
fns_map := {
'sqr': sqr
'cube': cube
}
println((2)) // "8"
}
```