On Tuesday 05 September 2006 07:52, Trey Harris wrote:
> I don't think you're dumb; the Synopses just require that you intuit
> certain things from each other, from examples in other Synopses, and so on
> in a Perlish sort of way; what you're looking for is not spelled out
> explicitly.  It can be found by noticing how you specify subtypes, along
> with noticing that subtypes can be specified as parameter types.  There's
> also an example showing explicitly what you want in S12.
Ok, I'll try to dive through the documentation before asking questions.

> It's just
>
>     multi sub SomeThing(Num $a where {$^a == 4}, Num $b) { $b + 2  }
>     multi sub SomeThing(Num $a, Num $b where {$^b == 3}) { $a + 1  }
>     multi sub SomeThing(Num $a, Num $b)                  { $a * $b }
>
> Yes, the signatures are different--the first two multis specify subtypes
> as their signatures, the last specifies a canonical type.
Thank you *very* much! That clears it up.


Regards,

Phil

Reply via email to