Gaal Yahas wrote:

How do I specify the signature of a context-sensitive function?

    sub foo() returns (what?) {
        return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
    }

If it were two subs, one would "is returns" Int and the other List of
Sheep. The draft S29 uses things like Int|List to express this kind
of thing but that looks weird to me (how would you return a typed
junction?). S06 and E06 don't raise this issue.

Being that I'm the one who wrote it that way, it doesn't look at all weird to me to do it that way. =)

I suspect a typed junction would look like : "Junction of Int|Str".

-- Rod Adams

Reply via email to