Murat Kasimov

More about me

Я language (β)

/Я language (β)/Tutorials/Command line task manager 10/

Full source codePrevious chapterNext chapter

Previously we were printing out ASCII characters one by one immediately. This is fine, however you have more control and code look cleaner if you prepare a line before displaying it.

In our case (since we are using Depth behaviour) indentation is a List of Units.

type Indent = List Unit

For each indentation level we need to print out two Space characters:

> indent = level >> `yok_` Plane @ List >> `ha__'yo` Glyph `ha` Symbol `ha` Punctuate >> `ha__` to @ List @ Twice >> `ha__` Space `lo` Space

Everything is ready to print an individial line - indentation level, task status and task text:

>> `ha___` at `ho` this @ Indent `ho` indent >>>> `lo_` is `hu` "TODO " `la` is `hu` "DONE " >>>> `ha_` at `ho` this @ Status >>> `ho__` to @ List `ha` Merge @ List @ List >>>> `lo_` at `ho` this @ String `ho` to @ List >>> `ho__` to @ List `ha` Merge @ List @ List