Generalizing some type signatures involving Int