If you have any suggestions for other generalization, do let us know (using a PR ;-)).