txt: ## call-me.md
  CALL-ME
  
  Combined from primary sources listed below.
  
  # [In role Enumeration](#___top "go to top of document")[§](#(role_Enumeration)_method_CALL-ME "direct link")
  
  See primary documentation
  [in context](/type/Enumeration#method_CALL-ME)
  for **method CALL-ME**.
  
  ```raku
  multi method CALL-ME(|)
  ```
  
  Returns an `Enumeration` instance given an enum value.
  
  ```raku
  enum Mass ( mg => 1/1000, g => 1/1, kg => 1000/1 );
  say Mass(1/1000); # OUTPUT: mg
  ```
  
  # [In role Callable](#___top "go to top of document")[§](#(role_Callable)_method_CALL-ME "direct link")
  
  See primary documentation
  [in context](/type/Callable#method_CALL-ME)
  for **method CALL-ME**.
  
  ```raku
  method CALL-ME(Callable:D $self: |arguments)
  ```
  
  This method is required for the [`( )` postcircumfix operator](/language/operators#postcircumfix_(_)) and the [`.( )` postcircumfix operator](/language/operators#index-entry-.(_)). It's what makes an object actually call-able and needs to be overloaded to let a given object act like a routine. If the object needs to be stored in an `&`-sigiled container, it has to implement Callable.
  
  ```raku
  class A does Callable {
      submethod CALL-ME(|c){ 'called' }
  }
  my &a = A;
  say a(); # OUTPUT: «called␤»
  ```
  
  Applying the `Callable` role is not a requirement to make an object callable; if a class simply wants to add subroutine-like semantics in a regular scalar container, the submethod `CALL-ME` can be used for that.
  
  ```raku
  class A {
      has @.values;
      submethod CALL-ME(Int $x where 0 <= * < @!values.elems) {
          @!values[$x]
      }
  }
  my $a = A.new: values => [4,5,6,7];
  say $a(2); # OUTPUT: «6␤»
  ```
  