Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

two nested loops output doesn't meet expectation #632

Answered by verdverm
zzxwill asked this question in Q&A
Discussion options

You must be logged in to vote

You have nested list comprehensions, so the list of lists is expected.

What you want to add is a list.FlattenN([[]], 1) around your nested list comp.

https://pkg.go.dev/cuelang.org/go@v0.3.0-alpha6/pkg/list#FlattenN

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@zzxwill
Comment options

Answer selected by zzxwill
Comment options

You must be logged in to vote
2 replies
@zzxwill
Comment options

@verdverm
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants