From e2b07a5fd0bbaad232c717fb90a31d6c61d72bd4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 14 Jul 2022 20:06:50 -0400 Subject: Try to include previous variable definitions in REPL links --- docs/doc/functional.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/doc/functional.html') diff --git a/docs/doc/functional.html b/docs/doc/functional.html index f3eea496..bec89fee 100644 --- a/docs/doc/functional.html +++ b/docs/doc/functional.html @@ -76,31 +76,31 @@ }

We can pass it the exponential function as an argument by giving it the name Exp and then referring to it in lowercase (that is, in a subject role). The result is a train that adds 1 to e-1 times the argument (we'll discuss only tacit functions here; for blocks see lexical scoping).

-↗️
    Exp  
+↗️
    Exp  
     Lin exp
 1+1.718281828459045×⊢
 

As with all functions, the result of Lin has a subject role. To use it as a function, we give it a name and then use that name with an uppercase spelling.

-↗️
    expLin  Lin exp
+↗️
    expLin  Lin exp
     ExpLin 5
 9.591409142295225
 

A tricker but more compact method is to use the 1-modifier {𝔽}, as a modifier's operand can have a subject or function role but its output always has a function role.

-↗️
    (Lin exp){𝔽} 5
+↗️
    (Lin exp){𝔽} 5
 9.591409142295225
 

Not the most accurate approximation, though.

-↗️
    Exp 5
+↗️
    Exp 5
 148.4131591025766
 

Note also in this case that we could have used a modifier with a very similar definition to Lin. The modifier is identical in definition except that 𝕏 is replaced with 𝔽.

-↗️
    _lin  {
+↗️
    _lin  {
       v0  𝔽 0
       v0 + ((𝔽 1) - v0) × 
     }
 

Its call syntax is simpler as well. In other cases, however, the function version might be preferable, for example when dealing with arrays of functions or many arguments including a function.

-↗️
    Exp _lin 5
+↗️
    Exp _lin 5
 9.591409142295225
 

Arrays of functions

-- cgit v1.2.3