On May 14, 2006, at 9:22, chromatic wrote:
I have a spot in Pheme where I'd like to use multi-dispatch on only
the first
argument to a function. The function itself is slurpy. That is:
Completing your example:
.sub some_function :multi( Array )
.param pmc args
print "array\n"
.end
.sub some_function :multi( string )
.param string first_arg
.param pmc args :slurpy
print "string\n"
.end
.sub main :main
.local pmc a
a = new .Array
some_function(a)
some_function("xx", a)
.end
$ ./parrot md.pir
array
string
... I don't see a problem.
leo