==================
Collection target fields and bindings
==================
flow work:
  generate 0 using sample
  let batches = generate 2 in 1 lane -> Text[]: Produce one batch.
  map in 2 lanes using transform
  let map -> Text: Transform {{_}}.
  let report = reduce using merge:
    from: Initial report.

---

(program
  (flow
    (runnable_name)
    (newline)
    (flow_body
      (generate_statement
        (integer_literal)
        (runnable_name)
        (newline))
      (let_statement
        (local_name)
        (generate_statement
          (integer_literal)
          (integer_literal)
          (inline_agic
            (type
              (builtin_type))
            (content
              (text))
            (newline))))
      (map_statement
        (integer_literal)
        (runnable_name)
        (newline))
      (let_statement
        (map_statement
          (inline_agic
            (type
              (builtin_type))
            (content
              (text))
            (newline))))
      (let_statement
        (local_name)
        (reduce_statement
          (runnable_name)
          (newline)
          (content
            (text))
          (newline))))))

==================
Inline reducer and initializer in a binding
==================
flow work:
  let report = reduce -> Text:
    Merge {{_}} with {{_1._}}.
    from: Initial report.
  run publish

---

(program
  (flow
    (runnable_name)
    (newline)
    (flow_body
      (let_statement
        (local_name)
        (reduce_statement
          (inline_agic
            (type
              (builtin_type))
            (newline)
            (content
              (text)
              (newline)))
          (content
            (text))
          (newline)))
      (run_statement
        (runnable_name)
        (newline)))))

==================
Removed collection words are ordinary content
==================
flow work:
  scatter using expand
  gather using merge
  storm 2 using sample
  settle using merge
  let old_items = scatter using expand
  let old_report = gather using merge
  let old_samples = storm 2 using sample
  let old_result = settle using merge

---

(program
  (flow
    (runnable_name)
    (newline)
    (flow_body
      (implicit_run_statement
        (content
          (text)
          (newline)
          (text)
          (newline)
          (text)
          (newline)
          (text)
          (newline)))
      (let_statement
        (local_name)
        (content
          (text))
        (newline))
      (let_statement
        (local_name)
        (content
          (text))
        (newline))
      (let_statement
        (local_name)
        (content
          (text))
        (newline))
      (let_statement
        (local_name)
        (content
          (text))
        (newline)))))

==================
Inline using in a binding exposes an error
==================
flow work:
  let items = map using: Transform.

---

(program
  (flow
    (runnable_name)
    (newline)
    (flow_body
      (let_statement
        (local_name)
        (map_statement
          (ERROR)
          (inline_agic
            (content
              (text))
            (newline)))))))
