Simplify return operation
Some checks failed
Build / build (push) Failing after 1m11s
Test / build (push) Failing after 11m42s

This commit is contained in:
Chuck Smith
2024-03-18 16:33:39 -04:00
parent b47a39e1b2
commit 98c8582fdb
7 changed files with 87 additions and 51 deletions

View File

@@ -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 {