Hi All

 

This is an idiot question, I should know the answer, but I have looked
around and can't find relevant documentation. I'm not asking for a full
answer, just a pointer as to where to start looking.

 

I have seen from examples in this forum that an expression like the
following:

 

paras collect: [para| para prettyPrinted]

 

can be written more concisely as:

 

paras collect: #prettyPrinted

 

which obviously works when I try it. It doesn't seem to fit in with the
definition of #collect:, which requires a block as argument. Where can I
find the relevant definition, either in method comments or in some general
manual? Can the notation be extended, for example to #select: - obviously
with an argument which returns a Boolean? Can it be used with a method which
requires an argument, e.g. as myArray collect: (#myMethod: arg)? Are there
any other extensions?

 

Any help gratefully received.

 

Peter Kenny

 

Reply via email to