From 971264ecf253a7907d24ed3af49db57f56dfe372 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 12 Dec 2021 10:47:10 -0500 Subject: =?UTF-8?q?Use=20/=E2=81=BC=20instead=20of=20/=E2=81=BC=E2=88=A7?= =?UTF-8?q?=20where=20appropriate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/replicate.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/replicate.md') diff --git a/doc/replicate.md b/doc/replicate.md index fd53caaf..d41a12c8 100644 --- a/doc/replicate.md +++ b/doc/replicate.md @@ -141,6 +141,6 @@ Finding how many times each index appears in a list of indices is often a useful ≠¨⊔ 2‿2‿4‿1‿2‿0 - /⁼∧ 2‿2‿4‿1‿2‿0 + /⁼ 2‿2‿4‿1‿2‿0 -For `/⁼` to work, the argument has to be sorted: otherwise it won't be a valid result of `/`. But sorting with `∧` is no problem, and `/⁼∧` will probably be faster than `≠¨⊔` in the absence of special handling for either combination. +The last of these is an extension defined in the language specification. As we said, the result of Indices is always sorted, so properly there's no argument that could return `2‿2‿4‿1‿2‿0`. But the index-counting function is very useful, so `/⁼` is defined to implicitly sort its argument (which is still required to be a list of natural numbers). Since `/⁼` is implemented as a single operation, it's the best way to perform this counting task. -- cgit v1.2.3