3 ms·
Well. Not an expert so this is lacking nuance: So Dyalog back some years ago came up dfns. Traditional Dyalog functions are something like: RV←foo MyFun bar
by Avshalom 10y ago
Well. Not an expert so this is lacking nuance:
So Dyalog back some years ago came up dfns. Traditional Dyalog functions are something like:
RV←foo MyFun bar;x;y;z
....
....
where RV is semi-optional the return value; foo and bar are the right and left arguements; and x y z are all local variables. Any variables declared in the function body are global. You can't nest functions like this.
Dfns look like
MyFun ← {
...
}
this comes with four variables automatically ⍺ ⍵ which are the right and left values and ⍺⍺ ⍵⍵ the right and left functions. you can nest dfns and variables declared inside are lexically scoped.
Co-Dfns is a compiler (written in Dyalog) which adds parallel primitives into this existing dialect of Dyalog.
- Athas 10y agoI don't think the idea is that Co-Dfns extends the Dyalog APL language. Rather, it exploits the data-parallelism that is already inherent in most APL code.