A little thing about function templates / Ruby

Christian Kamm kamm at nospam.de
Mon Feb 12 13:35:15 PST 2007


> ' channelStrip.activeDevices((Device e) { e.processAudio(inBuffer,  
> outBuffer); });

In case you don't already know: depending on what channelStrip and  
activeDevices are, using the foreach syntax might also be worth looking  
into:

foreach(device; &channelStrip.activeDevices)
   device.processAudio(inBuffer, outBuffer);

You can do this by making activeDevices a function that follows the rules  
for opApply.

Christian



More information about the Digitalmars-d mailing list