# `RustQ.Meta.Lower.Comprehension`
[🔗](https://github.com/elixir-crab/rustq/blob/v1.0.0-rc.19/lib/rustq/meta/lower/comprehension.ex#L1)

Comprehensions, as values and as loops.

A comprehension used as a value is an iterator pipeline: each generator filters and binds
its items in one `filter_map`, later generators nest through `flat_map`, and the result is
collected into the type expected, or the collection `into:` names. Run for its effects, a
comprehension is nested `for` loops, and `for ..., reduce: acc` is a loop updating `acc`.

# `collect_as`

A `collect()` given the type it collects into, when Rust cannot infer it.

# `collect_target`

The type a binding collects into: its own, or a list of what Rust infers for a slice.

# `comprehension_parts`

A comprehension split into its qualifiers and its options, `into:`, `reduce:`, and `do:`.

# `lower_comprehension`

Lowers a comprehension used as a value, collecting into `expected_type` when known.

# `lower_for_loop`

Lowers a comprehension run for its effects, as nested `for` loops.

# `lower_for_reduce_expr`

Lowers `for ..., reduce: acc` as a loop updating `acc`.

# `lower_for_reduce_expr`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
