xgo/objects/builtin_print.go
2019-01-18 01:43:46 -08:00

17 lines
245 B
Go

package objects
import (
"fmt"
)
func builtinPrint(args ...Object) (Object, error) {
for _, arg := range args {
if str, ok := arg.(*String); ok {
fmt.Println(str.Value)
} else {
fmt.Println(arg.String())
}
}
return nil, nil
}