class

Cosmo::Callable

Inherits Reference / Object

Instance methods

arity

The amount of parameters this function will accept

Source
call(args : Array(ValueType)) : ValueType

Executes the function body, passing in args

Source
expand_args(args : Array(ValueType)) : Array(ValueType)

Expands any Spreads in the argument list

Source
intrinsic?

Whether or not this function is intrinsic

Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source