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

[sc-dev] [propose] Dictionary:embedInStream

Here's an unnecessary gotcha:

embedInStream { arg event;
^yield(event !? { event.copy.putAll(this) })

So if I have a ListPattern where the list is an array of Events, I want the stream to output just the events, no mussing about. Instead, I have to pass in an empty protoevent... huh?

May I propose?

embedInStream { arg event;
^yield(if(event.notNil) { event.copy.putAll(this) } { this })

Or maybe you need this.copy in the else branch.



: 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