From fa1617d0e9020f67abb1ce5ae84293b70c1adec3 Mon Sep 17 00:00:00 2001
From: James Clark Query expression
clause. The input to the first clause is a single empty frame.
-The execution of a clause may complete early with an error value, in which case
-this error value is the result of the query, except when constructing a stream.
-Otherwise, the result of evaluating a query expression is a single value, which
-is constructed from the sequence of values emitted by the last clause. The
-result must be one of the following basic types:
+When a from
or join
clause is executed, it makes calls
+to the next
method of an Iterator object. If any of these calls
+return an error value e, then we say that the clause completes
+early with error value e.
+
+A query-expr that does not construct a stream is evaluated as described in this +paragraph. If a clause completes early with error value e, then the +result of evaluating the query-expr is e. The normal rules apply if +the execution of any clause results in the evaluation of an expression +completing abruptly. Otherwise, the result of evaluating a query expression is a +single value, which is constructed from the sequence of values emitted by the +last clause. The result must be one of the following basic types: