function to the dictionary is a meta-interpreter action, you have to do
it in Python, not Joy.
-.. code:: python
+.. code:: ipython2
from notebook_preamble import D, J, V
A long trace
------------
-.. code:: python
+.. code:: ipython2
V('[23 18] average')
``size`` we can use a “compiled” version hand-written in Python to speed
up evaluation and make the trace more readable.
-.. code:: python
+.. code:: ipython2
from joy.library import SimpleFunctionWrapper
from joy.utils.stack import iter_stack
Now we replace the old version in the dictionary with the new version,
and re-evaluate the expression.
-.. code:: python
+.. code:: ipython2
D['size'] = size
You can see that ``size`` now executes in a single step.
-.. code:: python
+.. code:: ipython2
V('[23 18] average')