예제 #1
0
/*
If the input argument type is greater than NULL, we return the complement
of its Truth() method's return type. If Null or missing return the argument
itself.
*/
func (this *Not) Apply(context Context, arg value.Value) (value.Value, error) {
	if arg.Type() > value.NULL {
		return value.NewValue(!arg.Truth()), nil
	} else {
		return arg, nil
	}
}