from notebook_preamble import J, V, define
+ from notebook_preamble import J, V, define
@@ -100,11 +100,11 @@ the variables:
The three arguments are to the left, so we can âchop offâ everything to
the right and say itâs the definition of the quadratic
function:
define('quadratic == over [[[neg] dupdip sqr 4] dipd * * - sqrt pm] dip 2 * [/] cons app2')
+define('quadratic == over [[[neg] dupdip sqr 4] dipd * * - sqrt pm] dip 2 * [/] cons app2')
Letâs try it out:
-J('3 1 1 quadratic')
+J('3 1 1 quadratic')
-0.3819660112501051 -2.618033988749895
@@ -114,7 +114,7 @@ the right and say itâs the definition of 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.
-V('-5 1 4 quadratic')
+V('-5 1 4 quadratic')
. -5 1 4 quadratic