[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] finding a method



When you write _.name, that by itself compiles as a function. Any additional methods you chain onto that will apply to the function -- they don't get folded into the function definition.

In the partial application help file, there is "An example of what you can't do" that covers your case as well.
hjh


On Dec 23, 2007, at 5:07 PM, Sciss wrote:

ah...

y = x.detect( _.name === \deprecated ); // wrong
y = x.detect({ arg m; m.name === \deprecated }); // right

still don't understand why, but anyway i don't care ;_)

thx, -sciss-

: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net

.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman