Example of use of apply