cuelang.org/go@v0.10.1/internal/core/export/testdata/selfcontained/splitcomprehension.txtar (about) 1 #path: a.b 2 3 // TODO: merge output structs. 4 5 -- in.cue -- 6 import "encoding/yaml" 7 8 for key, value in { test: 1 } { 9 ("a"): b: k1: key 10 ("a"): b: v1: value 11 a: b: k2: key 12 a: b: v2: value 13 } 14 a: { 15 for key, value in { test: 1 } { 16 ("b"): k3: key 17 ("b"): v3: value 18 b: k4: key 19 b: v4: value 20 } 21 b: {} 22 } 23 -- out/self/default -- 24 25 { 26 k2: "test" 27 } & { 28 v2: 1 29 } & { 30 k4: "test" 31 } & { 32 v4: 1 33 } & { 34 k1: "test" 35 v1: 1 36 k3: "test" 37 v3: 1 38 }