implement high-order function unaryAction