Help for this page

Select Code to Download


  1. or download this
        package TypedArray;
        use Moose;
    ...
            push @{$self->elems}, @_;
        }
        ... more methods and operator overloads ...
    
  2. or download this
        TypedArray->new(type => Int, elems => [4, 8, -7])
    
  3. or download this
        TypedArray->new(Int, 4, 8, -7)
    
  4. or download this
        typedArray Int, 4, 8, -7
    
  5. or download this
        subtype TypedArrayOf
            as Parameterizable['TypedArray', 'Moose::Meta::TypeConstraint'
    +],
    ...
                my ($typed_array, $type) = @_;
                return "expected TypedArrayOf[$type], found TypedArrayOf[@
    +{[$typed_array->type]}]"
            };
    
  6. or download this
        TypedArray[Int]