I don't think this template function should be in any way authoritative, so let's namespace it.
15 lines
257 B
Plaintext
15 lines
257 B
Plaintext
import "golang"
|
|
import "iter"
|
|
|
|
$fn = func($x) { # notable because concrete type is fn(t1) t2, where t1 != t2
|
|
len($x)
|
|
}
|
|
|
|
$in1 = ["a", "bb", "ccc", "dddd", "eeeee",]
|
|
|
|
$out1 = iter.map($in1, $fn)
|
|
|
|
$t1 = golang.template("out1: {{ . }}", $out1)
|
|
|
|
test [$t1,] {}
|