Csound Csound-dev Csound-tekno Search About

[Cs-dev] Lambdas

Date2013-05-20 15:56
FromMichael Gogins
Subject[Cs-dev] Lambdas
AttachmentsNone  None  

I may have asked this before, but does the Csound 6 orchestra language have lambdas and/or closures?

Regards,
Mike


Date2013-05-20 16:25
FromSteven Yi
SubjectRe: [Cs-dev] Lambdas
Not currently.  Lambdas and closure both require there to be variables
with type :Opcode or something like that.  I've chatted with John Lato
and Victor about adding an Opcode type for variables so that we could
do stuff like:

aout map sin, asig

(There's a tabmap currently that's close, but uses an opcode name by
string like "sin"). I guess if we had lambdas we could do:

aout map {|k| -> sin(k)}, asig

or some other syntax.  The compiler could then read the lambda,
generated an anonymous UDO, then replace the usage with the generated
call (i.e. #udo1).  Closure would be a bit more difficult.

I'm interested to have opcodes as types so we can do
map/foldl/foldr/filter/apply/etc. kind of functional programming
stuff.

On Mon, May 20, 2013 at 3:56 PM, Michael Gogins
 wrote:
> I may have asked this before, but does the Csound 6 orchestra language have
> lambdas and/or closures?
>
> Regards,
> Mike
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net