def unaryOperator(op):
    """
    Returns a function which performs unary (not) operation
    """
    if op == 'not':
        return lambda x: not x
    raise Exception('operator %s not found' % op)
