I have a function that maps to a set of objects and I am totally confused by how to work out the type of the function.

So as an example a function that gets people of a certain age. A set of people such as {Mike, Claire, Paul, Christine}, and a function people(x) would return everyone of age x. So getPeople(25) would map to {Mike, Claire}

How do I work out the type? I thought it was getPeople : ages -> people but I've been told it shouldn't be people as it's not returning a person but a set of people.

Any help with this would be great thanks.