Notes can have second type constraint for generic functions higher-order functions like these will make your code simpler to read and maintain