HaloO John, your inquiry rate is quite high. I try to keep-up as good as I can. Without being authoritative, of course.
you wrote:
If a function returns different things if called in list context or item context, how do you define the "of" type (outer return type) to make the function strongly typed?
How about sub foo (--> Seq^Item) {...}? Unfortunately the set of type constructors is rather limited as of now. $Larry explicitly disallowed role R does A|B {...} at one point in the discussion. But these one-junction types would be very useful e.g. Num could actually be Real^NaN^Overflow^... so that if you wanted a non-exceptional type you could use Real. Note that this implies that Num is *unordered* and the order-ops actually act on the Real type. Regards, TSa. -- "The unavoidable price of reliability is simplicity" -- C.A.R. Hoare