thanks sven I will digest that.
One day I will have to avoid using block in my tiny language exercise.

Stef

Le 22/11/14 21:03, Sven Van Caekenberghe a écrit :
On 22 Nov 2014, at 20:50, stepharo <[email protected]> wrote:

Hi guys

What would be cull: equivalent for valueWithArguments:?

I need to be able to specify an extra argument to valueWithArguments
valueWithArgument:cull:?

Stef
The different variants/counts of #cull: come down to specifying one to four 
arguments to block evaluation/execution where the actual arguments (the count 
of them) is defined by the block, right ?

So I think it should be #cullWithArguments: where the number actually used is 
defined by the number accepted by the block.

I see that we already have #valueWithEnoughArguments:

[ :x :y | { x. y } ] valueWithEnoughArguments: #( 1 2 ). => #(1 2)

[ :x | { x } ] valueWithEnoughArguments: #( 1 2 ). => #(1)

[ ] valueWithEnoughArguments: #( 1 2 ). => nil

Which seems to do the same thing.

Sven





Reply via email to