Platform.Sub

Processes

Subscriptions a program re-reads after every update.

Types

Sub

type Sub msg = Sub

A subscription that can deliver messages to a program.

Examples

Sub.none

Values

none

none : Sub msg

A subscription that delivers nothing.

Examples

Sub.none

batch

batch : List (Sub msg) -> Sub msg

Listen to several subscriptions.

Examples

Sub.batch [ Time.every 1000 Tick, Process.listen name Got ]

map

map : (a -> msg) -> Sub a -> Sub msg

Tag the messages a subscription produces.

Examples

Sub.map ChildMsg childSub