implement unary functions as functors