# `CEL.Expr.Comprehension`
[🔗](https://github.com/hansihe/pb_ex/blob/v0.2.0/cel_ex/lib/cel/expr.ex#L209)

CEL's loop, which comprehension macros expand to. It appears directly in
the tree only for a parsed expression that has one without its macro,
such as one from another CEL implementation.

It binds `iter_var` (and `iter_var2`, for two-variable forms) to each
element of `iter_range` in turn, and `accu_var` to an accumulator that
starts as `accu_init`. While `loop_condition` holds, `loop_step` computes
the next accumulator; `result` is evaluated last.

# `t`

```elixir
@type t() :: %CEL.Expr.Comprehension{
  accu_init: CEL.Expr.t(),
  accu_var: String.t(),
  id: CEL.Checked.expr_id(),
  iter_range: CEL.Expr.t(),
  iter_var: String.t(),
  iter_var2: String.t() | nil,
  loop_condition: CEL.Expr.t(),
  loop_step: CEL.Expr.t(),
  result: CEL.Expr.t(),
  type: CEL.Expr.type()
}
```

---

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