mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
20 lines
370 B
Text
20 lines
370 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)
|