Simplify return operation
This commit is contained in:
@@ -151,14 +151,15 @@ func (s *String) Clone() Object {
|
||||
type BuiltinFunction func(args ...Object) Object
|
||||
|
||||
type Builtin struct {
|
||||
Fn BuiltinFunction
|
||||
Name string
|
||||
Fn BuiltinFunction
|
||||
}
|
||||
|
||||
func (b Builtin) Type() ObjectType {
|
||||
return BUILTIN_OBJ
|
||||
}
|
||||
func (b Builtin) Inspect() string {
|
||||
return "builtin function"
|
||||
return fmt.Sprintf("<built-in function %s>", b.Name)
|
||||
}
|
||||
|
||||
type Array struct {
|
||||
|
||||
Reference in New Issue
Block a user