xgo/objects/builtin_copy.go

10 lines
158 B
Go
Raw Normal View History

2019-01-09 10:17:42 +03:00
package objects
func builtinCopy(args ...Object) (Object, error) {
if len(args) != 1 {
2019-01-17 12:56:05 +03:00
return nil, ErrWrongNumArguments
2019-01-09 10:17:42 +03:00
}
return args[0].Copy(), nil
}