Murat Kasimov

More about me

Я language (β)

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

Full source codePrevious chapterNext chapter

Sometimes objective could be high-level and we want to split it into manageable activities. For this purpose we need a structure that provides this hierarchial order - Tree.

Initialising a tree without literals is not a pleasant experience (check out the source if you are interested). But let's say we did it already! As an example, we would consider some objective with subtasks. Anyway, we can traverse it printing out its items:

> main = start >> `yokl` Forth `ha` Await `ha__` is @ String >> `ho_'yokl` Forth `ha` Await `ha` output >> `ho_'yuk` Await `ha` output `ha` Caret `hv'he` Newline

The problem is that if we try to just print them one by one we lose information about hierarchy:

| Apply to that new position | Find their HR on Linkedin and ask on it | Check their open source contributions | Bail if you see AI slop there | Try to find people who work there

Luckily (what a coincidence again!) we can use additional co-Kleisli morphism with Depth level so that we can indent each item properly:

> main = start `kyokl` Depth `ha` Forth `ha` Await `ha` line

So now we can see hierarchy between tasks:

| + Apply to that new position |   + Find their HR on Linkedin and ask on it |   + Check their open source contributions |     + Bail if you see AI slop there |   + Try to find people who work there