examples: lang: Add a join example
Good reminder that a lot of the golang stdlib functions are available.
This commit is contained in:
9
examples/lang/join.mcl
Normal file
9
examples/lang/join.mcl
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import "fmt"
|
||||||
|
import "golang/strings"
|
||||||
|
|
||||||
|
$l = ["a", "b", "c",]
|
||||||
|
$joined = strings.join($l, ", ")
|
||||||
|
|
||||||
|
print "debug" {
|
||||||
|
msg => "${joined}",
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user