> I know, the point is just showing that the abstractions themselves are quite simple
Aye, absolutely, just wanted to nitpick on that statement: while it is technically true (still the best kind around), it can be... not sure what the word is, not quite misleading but it can cause people to waste time not using a library when a small one would do that job (and others) for them.
It's absolutely great that you clearly documented the "pattern" as it is a vital one to retain one's sanity, it's just that this phrase sounded like an unwarranted objection to libraries doing the exact thing you recommend :)