(this also fixes the use of a generic function type, where Nanoevents explciitly provides a cleaner type alias)