let initial_model =
Noop
match event
let cursor =
if model.cursor = 0 then length model.choices - 1
else model.cursor - 1
in
let cursor =
if model.cursor = length model.choices - 1 then 0
else model.cursor + 1
in
match status `unselected `selected
in
let choices =
mapi
model.choices
in
let options =
model.choices
|> mapi
|> concat "\n"
in
sprintf
options
let app = app ~init ~update ~view (
let ( = start app ~initial_model