From 4c1292ee8e27e59891a60c2f1bf3c326d4dba51f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 13 Jun 2021 22:14:24 -0400 Subject: Add self-comparison function diagram --- docs/doc/selfcmp.html | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) (limited to 'docs/doc/selfcmp.html') diff --git a/docs/doc/selfcmp.html b/docs/doc/selfcmp.html index 1374736f..9188c69c 100644 --- a/docs/doc/selfcmp.html +++ b/docs/doc/selfcmp.html @@ -5,6 +5,132 @@

Self-comparison functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 'm' + 'i' + 's' + 's' + 'i' + 's' + 's' + 'i' + 'p' + 'p' + 'i' + 0 + 1 + 2 + 2 + 1 + 2 + 2 + 1 + 3 + 3 + 1 + 0 + 0 + 0 + 1 + 1 + 2 + 3 + 2 + 0 + 1 + 3 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 'm' + 'i' + 's' + 'p' + + 𝕩 + + + + + + + +

BQN has four self-comparison functions, Classify (), Occurrence Count (), Mark Firsts (), and Deduplicate (). Each of these is a monadic function that obtains its result by comparing each major cell of the argument (which must have rank at least 1) to the earlier major cells with match. For example, Mark Firsts indicates the cells that don't match any earlier cell, making them the first of their kind.

↗️
     "abaacb"
 ⟨ 1 1 0 0 1 0 ⟩
-- 
cgit v1.2.3