From 5e81613ac137c5641675ceb792ca105d345d98c6 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 14 Jul 2022 21:02:14 -0400 Subject: Handle transitive dependencies in REPL link code --- docs/tutorial/variable.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/tutorial/variable.html') diff --git a/docs/tutorial/variable.html b/docs/tutorial/variable.html index 5e05d336..9314a878 100644 --- a/docs/tutorial/variable.html +++ b/docs/tutorial/variable.html @@ -24,11 +24,11 @@ ⟨ 3 7 ⟩

A variable can't be defined twice in the same scope. Later we'll work with functions and other pieces of code that create their own scopes, but for now all you need to know is that all the code in a tutorial runs in the same scope. So three is already defined, and can't be defined again.

-↗️
    three  4
+↗️
    three  4
 Error: Redefinition
 

It's a little crazy to call them variables if the definition can never change, right? Doesn't "variable" mean "able to change"? Fortunately, this is one way in which BQN isn't crazy. You can modify a variable's value with the arrow provided it's already been defined. This never does anything to the original value: that value stays the same; it's just (probably) not the value of the modified variable any more.

-↗️
    three  4
+↗️
    three  4
 
     three = 3   # Wait why did I do that
 0
@@ -46,7 +46,7 @@
 

Does BQN not know about capital letters? Does it object to self-reference? Why is "BQN" green? At least there's an error message, and a "role" is something we've heard about before. Assignment means anything written with a leftward arrow—either definition or modification.

I'll first confuse you a little more by pointing out that BQN's variables are case-insensitive, and even underscore-insensitive!

-↗️
    three
+↗️
    three
 3
     thrEe
 3
@@ -60,7 +60,7 @@
 3
 

But the syntax highlighter still seems to care, and you'll get a strange result if you try to apply a function to one of the uppercase spellings:

-↗️
    - Three
+↗️
    - Three
 -3{𝔽}
 
     - _three
-- 
cgit v1.2.3