There's a library that does somthing very similar ...
# stdlib
k
There's a library that does somthing very similar to this, using infix functions to make the whole thing more fluent. I can never find it though, for some reason it doesn't really show up on google.