Re: "returns" and context

2005-06-01 Thread TSa (Thomas Sandlaß)
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 thin

Re: "returns" and context

2005-05-31 Thread Rod Adams
Sam Vilain wrote: Rod Adams 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; } I suspect a typed junction would look like : "Junction of Int|Str". Not quite.

Re: "returns" and context

2005-05-31 Thread Sam Vilain
Rod Adams 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; } I suspect a typed junction would look like : "Junction of Int|Str". Not quite. AIUI that means a Junct

Re: "returns" and context

2005-05-31 Thread Rod Adams
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

"returns" and context

2005-05-31 Thread Gaal Yahas
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