# sequence

`sequence(...programs)` returns one immutable program whose children run in
source order. Empty and zero-duration children preserve deterministic boundary
and milestone ordering.

Related type: [`PibblAnimationProgram`](/reference/types/canvas-runtime/#pibblanimationprogram).

## API details from source

<span id="api-sequence"></span>

Activates children in source order.

```ts
sequence: (...children: readonly PibblAnimationProgram[]) => PibblAnimationProgram
```

Related API: [sequence](/reference/functions/sequence/), [PibblAnimationProgram](/reference/types/canvas-runtime/#pibblanimationprogram).

### Parameters

- **`children`** — Programs in execution order. See [PibblAnimationProgram](/reference/types/canvas-runtime/#pibblanimationprogram).

### Returns

A program that runs each child after its predecessor completes. See
[PibblAnimationProgram](/reference/types/canvas-runtime/#pibblanimationprogram) .

### See also

[PibblAnimationProgram](/reference/types/canvas-runtime/#pibblanimationprogram)

[View source — packages/core/src/lib/animation/program.ts:811](/source/packages/core/src/lib/animation/program-ts/#L811)

## Implementation guidance for agents

Read the [Animation and scheduling companion](/agents/topics/animation/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Compose keyframes and springs](/minimal-examples/animation/composition/): Run two independent tracks together, then mark, wait, and repeat. [Plain source](/minimal/animation/composition.tsx)
## Interactive examples

- [Signals and animation](/examples/signals-and-animation/) · [Full page](/experience/signals-and-animation/)
## Documentation version

Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.
