Full source code ⋅ Next chapter
We are about to build a toy task manager that should work in any terminal.
For simplicity, let task to be just a sequence of characters:
type Title = List ASCII
We have a non empty list of tasks we have an intent to do:
initial = Nonempty @List @Title
`ha` Item "Apply to that new position" `ha` Next
`ha` Item "Find a way to fix ligatures" `ha` Next
`ha` Item "Organize a boardgame session" `ha` Next
`ha` Item "Buy a water gun for Songkran" `ha` Last
For each task we want to print a title and put a newline after it:
print title = enter @World
`yuk___` Run `hv____` title `yokl` Forth `ha` Run `ha` output
`yuk___` Run `hv____` output `ha` Caret `hv` Newline
Next we will make our task manager more interactive - we would like to have a cursor for picking a task by scrolling up and downn.
Full source code is available here.