@microxpath_function('<STR_LIT>')<EOL>def boolean(ctx, obj):
if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>obj = next(seq.compute(ctx), '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>obj = seq<EOL><DEDENT>yield next(to_boolean(obj), '<STR_LIT>')<EOL>
Yields one boolean, false if the argument sequence is empty, otherwise

* false if the first item is a boolean and false
* false if the first item is a number and positive or negative zero or NaN
* false if the first item is a string and ''
* true in all other cases