Block evaluation with n+1 arguments

Steffen Märcker <[email protected]> Thu, 06 Apr 2023 13:28:52 +0000
Newsgroups gmane.comp.lang.smalltalk.vwnc
Message-ID <1680784381657.880526716.1595226978__28774.4157410756$1680787796$gmane$org@web.de>
Hi!

I want to evaluate a block an argument 'arg1' and additional n arguments
given in an array 'args'. The following code does the trick:

    block valueWithArguments: (Array with: arg1) , args.

Is there a way to do this without the overhead of creating a new Array?
(How) Can I add additional #value:value:[...] methods to BlockClosure that
evaluate the block with n arguments directly without falling back to
#valueWithArguments: ? If yes, what's the maximum?

Cheers!
Steffen