Solve the map construction problem using into function.