Add tons of builtin helpers and array operations.
Some checks failed
Test / build (push) Waiting to run
Build / build (push) Has been cancelled

This commit is contained in:
Chuck Smith
2024-03-24 12:11:46 -04:00
parent c9d96236dd
commit 99cea83f57
23 changed files with 413 additions and 49 deletions

10
object/builtin_args.go Normal file
View 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}
}