Perl 6'da özel bir Array-Reference Ints türünü nasıl tanımlanır? Bunu denedim, ama çalışmıyor:Perl 6'da bir Intel'in Arrayine ait bir özel tipi nasıl tanımlanır?
subset Array_of_Int of Array where *.all ~~ Int;
my $n = My::Class.new(option => < 22 3 4 5 >);
# Type check failed in assignment to $!option; expected My::Class::Array_of_Int but got List in block <unit> at ...
ihtiyacım sadece 'Int @ .option' vardır, ama daha önce bilmiyordum. –