From 18d1bce85de22f8bc7a08453618c7d9e94b61f92 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 28 May 2022 21:55:15 -0400 Subject: Editing --- docs/doc/identity.html | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'docs/doc/identity.html') diff --git a/docs/doc/identity.html b/docs/doc/identity.html index 520e1657..5ef3bde7 100644 --- a/docs/doc/identity.html +++ b/docs/doc/identity.html @@ -18,7 +18,7 @@ "left" "right" "left" -

Depending on your past experiences, this could cause some confusion: built-in support for functions that do nothing? Documentation should say why a feature's there and how to use it, not just what it does, so we'll try to address this below. The most important single use is for tacit programming, but there are a variety of other uses as well.

+

Depending on your past experiences, this could cause some confusion: built-in support for functions that do nothing? Documentation should say why a feature's there and how to use it, not just what it does, so we'll try to address this below. The most important single use is for tacit programming, but there are a variety of other uses as well.

Of course, it's easy to write block functions {𝕩} and {𝕨} that return particular arguments. While I would already make and primitives just because they are common and important, there are also specific disadvantages to using blocks. They fail to indicate that there are no side effects, as primitives would, and they also need special casing for the interpreter to manipulate them when applying Undo () or making other inferences.

Filling arrays

What's the easiest way to create a matrix with 0 on the first row, 1 on the second, and so on? Probably this one, with table:

@@ -68,19 +68,8 @@ 4.5

A larger class of block functions can be translated just by adding parentheses and ˙ (there's a discussion of this technique in APL here). It's helpful when writing tacit code to know that Fn applies Fn to the left argument only and Fn applies it to the right argument—these can be read "Fn of left" and "Fn of right".

-

Syntax tricks

+

One more thing

You've probably seen used in documentation to display the value of a variable being assigned. This is a hack, and in most contexts •Show should be used to display values.

↗️
     a  "show this"
 "show this"
 
-

More importantly, can be used to ignore a right argument for modified assignment, to apply a function "in place" to a variable without writing the variable name twice.

-↗️
    a  @
-"siht wohs"
-
-

In APL a tack can be used to avoid stranding numbers together. In BQN, stranding is explicit, and there's no need!

-↗️
    ÷23 24
-3
-    ÷23 24
-3
-
-

(Wow, what a useless section.)

-- cgit v1.2.3