# `Skuld.Comp.ExternalSuspend`
[🔗](https://github.com/mccraigmccraig/skuld/blob/main/lib/skuld/comp/external_suspend.ex#L1)

External suspension for yielding to code outside Skuld's env threading.

Unlike `InternalSuspend` (which receives env at resume time), this suspension
closes over the env at suspension point. Use this when:
- Yielding values to external code that doesn't understand Skuld's env
- The Yield effect's coroutine-style suspension
- Any suspension where the caller will provide a value but not an updated env

## Resume Signature

`resume :: (val) -> {result, env}` - closes over env from suspension point

The `:data` field holds decorations added by scoped effects via `transform_suspend`.
Default is `nil` to distinguish "no decorations" from "empty decorations map".

# `t`

```elixir
@type t() :: %Skuld.Comp.ExternalSuspend{
  data: map() | nil,
  resume: (term() -&gt; {term(), Skuld.Comp.Env.t()}) | nil,
  value: term()
}
```

---

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