My question has been edited by a moderator to include the tag reinventing-the-wheel.
Allthough I did state
I am not relying on libraries like cats even if they might already provide solutions for what I am doing
I truly believe that this edit is highly superfluous - not only does it add no value to the question (it actually seems to be rather degrading in this case), but more importantly my question does not adhere to the definition of the tag:
... involve code that is already fully implemented ...
I did not rewrite anything from the library mentioned earlier or any other library I know, and this statement was supposed to veer of answers pointing out how what I am doing could be done with half the code with a certain library at hand.
Judging by the profile, the moderator at hand seems to have little to no experience with the programming language in question, and - if that impression is correct - would not have been able to understand the code well enough to make an educated decision wether or not I was "reinventing the wheel".