cue-lang / docs-and-content

A place to discuss, plan, and track documentation on cuelang.org
5 stars 1 forks source link

docs/howto/<usecase>-by-chaining-comprehensions: <usecase> by chaining comprehensions #122

Open jpluscplusm opened 2 months ago

jpluscplusm commented 2 months ago

https://github.com/cue-lang/cue/discussions/1945#discussioncomment-3759734 and https://cuelang.slack.com/archives/CLT3ULF6C/p1710364914647979?thread_ts=1710352807.699769&cid=CLT3ULF6C point to a need to document how CUE allows comprehensions to be "chained" together.

We attempt to address this, slightly, via the examples on https://cuelang.org/docs/tour/expressions/listcomp/, but there isn't space on that page to call out the technique explicitly - it's left as an observable characteristic of CUE that we hope people will intuit from the preamble prose.

This guide perhaps shouldn't have a URL/title of "docs/howto/chaining-comprehensions", because it's unlikely that someone will explicitly search for that term before they're aware of it. We should figure out the tangible (yet somewhat generic) user need that can take the place of the "" placeholder in this issue's title, which matches what a user might search for before they're aware of the "chaining" term.