Recover the square spiral example code.

I hve no idea how this isn't in VCS.  I checked hg and git.  Is it in
an old branch that I deleted before merging or something?  I have
backups from which to restore, but it would be nice to know how I effed
it up in the first place, eh?
This commit is contained in:
Simon Forman
2021-11-27 09:04:25 -08:00
parent f96013d649
commit 1b193b1924
63 changed files with 17476 additions and 1013 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
.. code:: python
.. code:: ipython2
from notebook_preamble import J, V, define
@@ -81,13 +81,13 @@ the variables:
The three arguments are to the left, so we can “chop off” everything to
the right and say its the definition of the ``quadratic`` function:
.. code:: python
.. code:: ipython2
define('quadratic == over [[[neg] dupdip sqr 4] dipd * * - sqrt pm] dip 2 * [/] cons app2')
Lets try it out:
.. code:: python
.. code:: ipython2
J('3 1 1 quadratic')
@@ -102,7 +102,7 @@ lines are the ``dip`` and ``dipd`` combinators building the main program
by incorporating the values on the stack. Then that program runs and you
get the results. This is pretty typical of Joy code.
.. code:: python
.. code:: ipython2
V('-5 1 4 quadratic')