I wonder if there actually are any existing abstractions for that purpose