TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
Which is no problem if ::T defines it in the lexical scope. Any
outer definition is hidden. I guess re-using ::T in the same scope
again for capturing a new type is an error. Just like redeclaring
a value variable. BTW is
You appear to be saying t
HaloO,
John M. Dlugosz wrote:
First, consider the stated examples for Generic type parameters, from
the passage which defines the terminology in S02:
I fear we need a rigorous definition of generic first.
sub max (Num ::X @array)
> {
>push @array, X.new();
> }
Here you have a nice exam
First, consider the stated examples for Generic type parameters, from the
passage which defines the terminology in S02:
sub max (Num ::X @array) {
push @array, X.new();
}
sub compare (Any ::T $x, T $y) {
return $x eqv $y;
}