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