# `Flezha.SDK.Merge`
[🔗](https://github.com/flezha/flezha_elixir_sdk/blob/v0.1.0/lib/flezha/sdk/merge.ex#L1)

A merged subscription under construction, built by `Flezha.SDK.ChannelBuilder.merge/1`:
one tasklet fed by two or more source streams, each with the mapping that
lifts its value into the merged input.

    c
    |> merge()
    |> from(ticks, &{:tick, &1})
    |> from(quotes, &{:quote, &1})
    |> key_by(&symbol_of/1)
    |> into(Detector)

Every step is `Flezha.SDK.ChannelBuilder`', dispatching on the handle it receives,
so one import writes a whole pipe. This module is the handle they carry
between them: the sources recorded so far, each already mapped, and the key
the merged node is declared on. Every source the author wrote reaches the
record, a repeated one included; `flz_core`'s check is what names
`MergeTooFewSources` and `DuplicateMergeSource`.

# `t`

```elixir
@type t() :: %Flezha.SDK.Merge{
  builder: reference(),
  keys: [(term() -&gt; term())],
  sources: [Flezha.SDK.Stream.t()]
}
```

---

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