NAME

SPVM::Comparator - a callback class for comparation

SYNOPSYS

use SPVM::Comparator;

my $comparator : SPVM::Comparator = sub : int ($self : self, $x1 : object, $x2 : object); {
  return $x1 > $x2;
};

my $result = $comparator->compare;

DESCRIPTION

SPVM::Comparator is a callback type to stringify object.

INSTANCE METHODS

compare

sub compare : int ($self : self, $x1 : object, $x2 : object);