At 7:30 AM +0000 1/24/03, Piers Cawley wrote:
In my quest to eliminate as many explicit conditionals from my code as possible, I found myself wondering if Perl 6's multidispatch mechanism would allow one to write:
Okay, I think I remembered the problem. Assume the following:
list bar(int); # bar takes an int, returns a list scalar bar(int); # bar takes an int, returns a scalar and also assume the following: xyzzy(scalar); # xyzzy takes a scalar xyzzy(list); # xyzzy takes a list and then we make the call: xyzzy(bar(1)); Which bar do we call? And which xyzzy? -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk