xgo/objects/callable.go

10 lines
314 B
Go
Raw Normal View History

2019-01-10 06:07:03 +03:00
package objects
2019-01-17 12:56:05 +03:00
// Callable represents an object that can be called like a function.
2019-01-10 06:07:03 +03:00
type Callable interface {
// Call should take an arbitrary number of arguments
// and returns a return value and/or an error,
// which the VM will consider as a run-time error.
2019-01-10 06:07:03 +03:00
Call(args ...Object) (ret Object, err error)
}