# Fx.sync

Lazily evaluates a synchronous function once for each Fx run.

## Signatures

```ts
export declare const sync: <A>(evaluate: () => A) => Fx<A>;
```

## Why

`sync` is the direct constructor for one value that must be computed at run time,
such as a fresh DOM node or a snapshot read from an imperative API. Unlike
`succeed`, it does not evaluate the function while the Fx is being assembled.

## Ownership and lifetime

Construction performs no work. Each run evaluates `evaluate` exactly once in the
run's fiber, emits its result, and completes after the Sink handles it. A thrown
exception is an Effect defect; use `Fx.fromEffect(Effect.try(...))` when failure is
expected and belongs in the typed error channel.

## Examples

```ts
import { Fx } from "@typed/fx"

const element = Fx.sync(() => document.createElement("div"))
```
