Added perfect forwarding. Map can acept more functions.