The subtitle seems more correct than the title. React got out of the way. So, it may be elegant, but I wonder if code maintenance is trashed. Yes the functions may be pure and have no side effects, but that doesn’t matter if I can’t reason how I would enhance it and where I would insert the enhancement. There are many black boxes. I wonder if this is too far in terms of code lifetime and maintenance.
Personally I would have preferred the compose be implemented at the beginning versus showing the pseudo code and then using R’s implementation. It is easy to get lost right away and the gap would be easier on the reader bridged. Thanks for writing this.