map function on tuples