SPVM::Countable − Countable Interface
class Point {
interface Countable;
has elements : int[]
method length : string () {
my $length = @{$self−>{elements}};
return $length;
};
}
Countable interface in SPVM is the interface for countable classes.
"required method length : int ();"
Meants to return the lenght of the elements.
Copyright (c) 2023 Yuki Kimoto
MIT License