Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: function vars/args as dictionary
name
code content
// variables ({ var aa = 3, bb = aa + 1, cc = 5; { |d v| d.inject((), { |a i k| a[i] = v[k] }) }.(thisFunctionDef.varNames, this.getBackTrace.vars); }.()) // arguments ({ |aa=1 bb=3| { |d v| d.inject((), { |a i k| a[i] = v[k] }) }.(thisFunctionDef.argNames, this.getBackTrace.args); }.()) //both ({ |c=3 r=#[3,1]| var aa = 3, bb = r; { |trace| ['arg','var'].inject((), { |a type| var trace_vals = trace.perform((type++'s').asSymbol); a[type] = trace.functionDef.perform((type++'Names').asSymbol).inject( (), { |a i k| a[i] = trace_vals[k]}) }); }.(this.getBackTrace); }.(r:[4,1]));
code description
shortcuts to get function variables/arguments state as dictionary
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change