Implemented functor with apply and pure.