implement a generic fn mapf with prototype

template<class Sequence c , class UnaryFunction)

Sequence mapf(Sequence c , UnaryFunction f)

for ex if c is a seq containing the seq (3,2,7,6,8) and f is the fn that returns twice it integer agument. then container returned by mafc(c,f) is a list containing the seq(6,4,14,12,8).

Any hint/idea to solve it.