# `Slither.Stage.Beam`
[🔗](https://github.com/nshkrdotcom/slither/blob/v0.1.0/lib/slither/stage/beam.ex#L1)

Stage that runs an Elixir function.

Wraps a handler function as a pipeline stage. Supports both
item-level and batch-level processing.

## Options

  * `:handler` - Function `(Slither.Item.t(), Slither.Context.t() -> term())`
    that processes a single item. The return value becomes the item's new payload.
    Can also return `{:ok, payload}`, `{:skip, reason}`, `{:error, reason}`,
    or `{:route, dest, payload}`.
  * `:batch_handler` - Optional function for batch processing.
  * `:cardinality` - `:one` (default) or `:many`. When `:many`, the handler
    returns a list and each element becomes a separate downstream item.

---

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