Add tons of builtin helpers and array operations.
This commit is contained in:
10
object/builtin_args.go
Normal file
10
object/builtin_args.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package object
|
||||
|
||||
// Args ...
|
||||
func Args(args ...Object) Object {
|
||||
elements := make([]Object, len(Arguments))
|
||||
for i, arg := range Arguments {
|
||||
elements[i] = &String{Value: arg}
|
||||
}
|
||||
return &Array{Elements: elements}
|
||||
}
|
||||
Reference in New Issue
Block a user