1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

docs: vfmt the function example too (fix ci)

This commit is contained in:
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

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"
}
```