mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-14 15:55:02 +00:00
17 lines
341 B
Text
17 lines
341 B
Text
interface Action
|
|
exposes [Action, none, update, map]
|
|
imports []
|
|
|
|
Action state : [None, Update state]
|
|
|
|
none : Action *
|
|
none = None
|
|
|
|
update : state -> Action state
|
|
update = Update
|
|
|
|
map : Action a, (a -> b) -> Action b
|
|
map = \action, transform ->
|
|
when action is
|
|
None -> None
|
|
Update state -> Update (transform state)
|