From 2fd3a7b32e554d021915ebbd3b6f00dd2b80ff16 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 1 Nov 2020 10:34:56 -0500 Subject: Recompile docs with new (more precise) dzaima/BQN number formatting --- docs/doc/block.html | 2 +- docs/doc/functional.html | 4 ++-- docs/doc/syntax.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/doc') diff --git a/docs/doc/block.html b/docs/doc/block.html index 21354448..10896e93 100644 --- a/docs/doc/block.html +++ b/docs/doc/block.html @@ -94,7 +94,7 @@

However, Β· can only be used as an argument, and not a list element or operand. Don't use 𝕨 in these ways in a function that could be called monadically. Another potential issue is that ⊸ and ⟜ don't work the way you might expect.

↗️
    { 𝕨 β‹†βŠΈ- 𝕩 } 5
-143.413159102577
+143.4131591025766
 

Called dyadically, this function will expand to (⋆𝕨)-𝕩, so we might expect the monadic result to be -𝕩. This sort of expansion isn't right with Β· on the left. β‹†βŠΈ- taken as a whole is a function, so Β· β‹†βŠΈ- 𝕩 is just β‹†βŠΈ- 𝕩, or (⋆𝕩)-𝕩, giving the large result seen above.

Operands

diff --git a/docs/doc/functional.html b/docs/doc/functional.html index 7debbe20..76dc6777 100644 --- a/docs/doc/functional.html +++ b/docs/doc/functional.html @@ -111,11 +111,11 @@

Like any function, this one can be given a name and then called. A quirk of this way of defining a function is that it has a subject role (it's the result of the function {π•Žβˆ˜π•}Β΄) and so must be defined with a lowercase name.

↗️
    gauss ← {π•Žβˆ˜π•}Β΄ ⋆‿-β€Ώ(Γ—Λœ)
     Gauss 2
-0.0183156388887342
+0.01831563888873418
 

Another, and probably more common, use of arrays of functions is to apply several different functions to one or more arguments. Here we apply three different functions to the number 9:

↗️
    ⟨√, 2⊸∾, ⊒-β‹†βŸ© {π•Žπ•©}Β¨ 9
-⟨ 3 ⟨ 2 9 ⟩ ¯8094.08392757538 ⟩
+⟨ 3 ⟨ 2 9 ⟩ ¯8094.083927575384 ⟩
 

The 2-modifier Choose (β—Ά) relies on arrays of functions to… function. It's very closely related to Pick βŠ‘, and in fact when the left operand and the elements of the right operand are all data there's no real difference: Choose returns the constant function π•—βŠ‘π•˜.

↗️
    2β—Ά"abcdef" "arg"
diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html
index 4f8eb345..88e006fc 100644
--- a/docs/doc/syntax.html
+++ b/docs/doc/syntax.html
@@ -108,7 +108,7 @@
 

BQN has single-token notation for numbers, strings, and characters.

Numbers allow the typical decimal notation with Β― for the negative sign (because - is a function) and e for scientific notation (or E, as numeric notation is case-insensitive). ∞ and Ο€ may be used as special numeric values. If complex numbers are supported, then they can be written with the components separated by i. However, no BQN to date supports complex numbers.

↗️
    ⟨ Β―Ο€ β‹„ 0.5 β‹„ 5eΒ―1 β‹„ 1.5E3 β‹„ ∞ ⟩   # A list of numbers
-⟨ ¯3.14159265358979 0.5 0.5 1500 ∞ ⟩
+⟨ ¯3.141592653589793 0.5 0.5 1500 ∞ ⟩
 

Strings are written with double quotes "", and characters with single quotes '' with a single character in between. A double quote within a string can be escaped by writing it twice; if two string literals are next to each other, they must be separated by a space. In contrast, character literals do not use escapes, as the length is already known.

↗️
    β‰ Β¨ ⟨ "str" β‹„ "s't""r" β‹„ 'c' β‹„ ''' β‹„ '"' ⟩   # "" is an escape
-- 
cgit v1.2.3