From 231182c3ff953d595a1dbaf8be3c74058ee97e29 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 5 Feb 2021 09:30:18 +0200 Subject: [PATCH] docs: vfmt the function example too (fix ci) --- doc/docs.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 881d84cc82..c8cadcbced 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -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" } ```