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) {...}?


Interesting idea, but that doesn't tell the compiler that the return is keyed to the context. The compiler should know what return type to expect, if only I could explain it.

I don't see how Seq^Item as a type is any different than Seq|Item. It can only hold one at a time anyway.

Reply via email to