You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a convenient factory function for Variable objects.
variable() is defined in env and can be accessed like that:
import{variable}from'deep6/env.js';
The current implementation:
constvariable=name=>newVariable(name);
Example of use:
import{variable}from'deep6/env.js';constx=variable(),// anonymousy=variable('pilot'),// namedz=variable(Symbol.for('trend')),// uses a global symbola=variable('pilot'),// the same as "y" aboveb=variable(Symbol.for('trend')),// the same as "z" abovec=variable(Symbol('rocket'));// uses a named symbol