A very important aspect of MillScript is its elegant handling of multiple valued expressions. In MillScript, an expression may evaluate to zero, one or more results. There are two ways for an expression to evaluate to more than one result. Firstly, the comma operator evaluates the left and right hand sides (in that order) and yields the results of the left followed by the results of the right. Secondly, loop expressions (for/while/until) yield the results generated by each evaluation of the loop body.
To prevent this getting out of control, there are several contexts where only one result is satisfactory - in particular the right hand side of assignments, loop collections and XML attributes. Furthermore, an assignment is guaranteed to yield zero results.
Another important situation occurs in statements. The result of a
statement is its final expression; all preceeding expressions in a
statement are required to return zero results! In order to comply
with this this restriction you will occasionally have to make use of
the none operator - which disposes of unwanted results.