Using a list comprehension to remove duplication in dynamic function bindings