Runtime evaluation/In an environment: Difference between revisions
Runtime evaluation/In an environment (view source)
Revision as of 01:25, 18 October 2018
, 5 years ago→{{header|Factor}}: tone down some snark
m (→{{header|Factor}}: remove some whitespace) |
m (→{{header|Factor}}: tone down some snark) |
||
Line 251:
=={{header|Factor}}==
Being a stack-based language, there is usually no need to bind data stack objects to a variable name. This is the idiomatic way to do it, with <code>eval</code> referencing what it needs from the data stack:
<lang factor>USE: eval
: eval-bi@- ( a b program -- n )
Line 261:
<lang factor>IN: scratchpad 9 4 [ dup * ] bi@- .
65</lang>
However
<lang factor>SYMBOL: x
: eval-with-x ( a b program -- n )
|