I came here to say exactly this The relevant part of the talk starts here. In the talk I opted for the function version (basically what @Qqwy suggests in the earlier response).