From 31b722e16e6a0f6b0f08e8409b2c7e240937bfed Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 27 Apr 2022 22:21:50 -0400 Subject: Documentation for Under --- docs/doc/undo.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/doc/undo.html') diff --git a/docs/doc/undo.html b/docs/doc/undo.html index 3a2ddcba..daf1b60d 100644 --- a/docs/doc/undo.html +++ b/docs/doc/undo.html @@ -5,7 +5,7 @@

Undo

-

Oh no, you've deleted a function after spending half an hour writing it! Well… hopefully your editor can help with that. But maybe you'll be interested to hear that BQN can reverse the action of some functions—ones that don't lose information. This capability is also used by Repeat () to repeat a negative number of times.

+

Oh no, you've deleted a function after spending half an hour writing it! Well… hopefully your editor can help with that. But maybe you'll be interested to hear that BQN can reverse the action of some functions—ones that don't lose information. This capability is also used by Repeat () to repeat a negative number of times, and Under () in some cases.

↗️
    2  "abcde"
 "cdeab"
 
@@ -19,7 +19,7 @@
     Fn Fn "BQN"
 "BQN"
 
-

Here it undoes a function to decrement the last character by incrementing that character. In part this is enabled by the clean design of BQN primitives, because better-behaved functions like those using structural Under are easier to invert.

+

Here it undoes a function to decrement the last character by incrementing that character. In part this is enabled by the clean design of BQN primitives, because better-behaved functions like those using structural Under are easier to invert.

The rules

If 𝔽 can be inverted exactly, then Undo just does that. However, there are also some other functions that BQN inverts. For example, the squaring function ט has both a positive and a negative inverse, and yet:

↗️
    ט ¯3
-- 
cgit v1.2.3