From 778a236d1420255d2534b6e734d4a962408b4b44 Mon Sep 17 00:00:00 2001 From: Peter Norvig Date: Tue, 21 Nov 2017 22:18:21 -0800 Subject: [PATCH] Add files via upload --- ipynb/Snobol.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipynb/Snobol.ipynb b/ipynb/Snobol.ipynb index a2c29e3..19e9147 100644 --- a/ipynb/Snobol.ipynb +++ b/ipynb/Snobol.ipynb @@ -28,7 +28,7 @@ "\n", "That would be around 40 to 60 lines of code; an easy task. But I noticed three interesting things about Snobol:\n", "\n", - "* There is an *indirection* operator, `$`, so if the variable `'word'` has the value `\"A\"`, then `'$word = i'` is the same as `'A = i'`.\n", + "* There is an *indirection* operator, `$`, so if the variable `'X'` has the value `\"A\"`, then `'$X = i'` is the same as `'A = i'`.\n", "* Uninitialized variables are treated as the empty string, so `'A += \"text\"'` works even if we haven't seen `'A'` before.\n", "* When the program ends, the Snobol interpreter automatically\n", "prints the values of every variable, sorted alphabetically, as a debugging aid.\n", @@ -37,7 +37,7 @@ "\n", "# The Concordance Solution\n", "\n", - "I ended up with a program similar to the following (translated from Snobol to Python augmented with `'$word'` indirection):" + "I ended up with a program similar to the following (translated from Snobol to Python, but with `'$word'` indirection):" ] }, {