lang: core: iter: Misc formatting fixes

Also fix up the examples.
This commit is contained in:
James Shubin
2024-07-02 23:49:56 -04:00
parent 7a35bef7ac
commit d1753c592a
4 changed files with 15 additions and 14 deletions

View File

@@ -10,4 +10,4 @@ $out1 = iter.map($in1, $fn)
$t1 = template("out1: {{ . }}", $out1)
test $t1 {}
test [$t1,] {}

View File

@@ -25,4 +25,4 @@ $out1 = iter.map($in1, $fn)
$t1 = template("out1: {{ . }}", $out1)
test $t1 {}
test [$t1,] {}

View File

@@ -37,7 +37,7 @@ $out1 = iter.map($in1, $fn)
$t1 = template("out1: {{ . }}", $out1)
test $t1 {}
test [$t1,] {}
file "/tmp/mgmt/map" {
state => $const.res.file.state.exists,

View File

@@ -343,7 +343,8 @@ func (obj *MapFunc) Stream(ctx context.Context) error {
func (obj *MapFunc) replaceSubGraph(subgraphInput interfaces.Func) error {
// Create a subgraph which splits the input list into 'n' nodes, applies
// 'newFuncValue' to each, then combines the 'n' outputs back into a list.
// 'newFuncValue' to each, then combines the 'n' outputs back into a
// list.
//
// Here is what the subgraph looks like:
//
@@ -356,9 +357,9 @@ func (obj *MapFunc) replaceSubGraph(subgraphInput interfaces.Func) error {
// "inputElemFunc1" -> "outputElemFunc1"
// "inputElemFunc2" -> "outputElemFunc2"
//
// "outputElemFunc0" -> "outputListFunc"
// "outputElemFunc1" -> "outputListFunc"
// "outputElemFunc1" -> "outputListFunc"
// "outputElem0" -> "outputListFunc"
// "outputElem1" -> "outputListFunc"
// "outputElem2" -> "outputListFunc"
//
// "outputListFunc" -> "subgraphOutput"
// }