call
call — calls a class method for a given instance.
call (instance, method, !argument...)
call (instance, class, method, !argument...)
instanceAn instance of a class.
methodA method name defined for the class of the instance.
classA class name.
argumentThe arguments to the method.
The result of calling the named method on the given instance with the provided arguments.
This function explicitly calls a class method for the provided instance,
using the same argument list as would be required for a call using
(instance method ...) syntax in Lisp, or the
instance.method (...) syntax in Gamma. The second
syntax of this function provides a means for calling an explicit class
method even if the class of the instance overloads the method name. Notice
that the arguments to call are all evaluated.
![]() | |
This example is based on the class and method developed in |
Gamma>call(sqB, Square, #perimeter);12Gamma>call(sqB, Square, #area);9Gamma>