slightly better types for map() of empty arrays