Object

/* ... */

perform / performWithArgList

Similar to apply in other languages. performWithArgList takes a method name (as a string) and a list of arguments, then calls the method with those arguments. perform works similarly, but takes all the arguments in the method call.

a := list(1, 2, 3)
a performWithArgList("append", list(4, 5, 6))
#=> list(1, 2, 3, 4, 5, 6)

list(1, 2, 3) perform("append", 7, 8, 9)
#=> list(1, 2, 3, 7, 8, 9)