examples: lang: Add a join example

Good reminder that a lot of the golang stdlib functions are available.
This commit is contained in:
James Shubin
2024-09-09 14:54:45 -04:00
parent 48dc9ad099
commit 3d0660559e

9
examples/lang/join.mcl Normal file
View File

@@ -0,0 +1,9 @@
import "fmt"
import "golang/strings"
$l = ["a", "b", "c",]
$joined = strings.join($l, ", ")
print "debug" {
msg => "${joined}",
}