From 1d6a9cf1441bd6d478977715d82031e77c20ce5c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 26 Oct 2020 15:46:38 -0400 Subject: Don't include &run in documentation REPL links: it's no longer used --- docs/doc/join.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/doc/join.html') diff --git a/docs/doc/join.html b/docs/doc/join.html index 50defc8a..55d58818 100644 --- a/docs/doc/join.html +++ b/docs/doc/join.html @@ -7,11 +7,11 @@

Join

Join () is an extension of the monadic function Raze from A+ and J to arbitrary argument ranks. It has the same relationship to Join to, the dyadic function sharing the same glyph, as Merge (>) does to Couple (): ab is >ab and ab is ab. While Merge and Couple combine arrays (the elements of Merge's argument, or the arguments themselves for Couple) along a new leading axis, Join and Join to combine them along the existing leading axis. Both Merge and Join can also be called on a higher-rank array, causing Merge to add multiple leading axes while Join combines elements along multiple existing axes.

Join can be used to combine several strings into a single string, like array.join() in Javascript (but it doesn't force the result to be a string).

-↗️
    "time""to""join""some""words"
+↗️
    "time""to""join""some""words"
 "timetojoinsomewords"
 

To join with a separator in between, we might prepend the separator to each string, then remove the leading separator after joining. Another approach would be to insert the separator array as an element between each pair of array elements before calling Join.

-↗️
    1↓∾' '¨"time""to""join""some""words"
+↗️
    1↓∾' '¨"time""to""join""some""words"
 "time to join some words"
 

Join requires each element of its argument to be an array, and their ranks to match exactly. No rank extension is performed.

@@ -21,7 +21,7 @@ RANK ERROR

However, Join has higher-dimensional uses as well. Given a rank-m array of rank-n arrays (requiring mn), it will merge arrays along their first m axes. For example, if the argument is a matrix of matrices representing a block matrix, Join will give the corresponding unblocked matrix as its result.

-↗️
     m  (31425) ¨ 23⥊↕6
+↗️
     m  (31425) ¨ 23⥊↕6
 ┌─                                   
 ╵ ┌─          ┌─      ┌─             
   ╵ 0 0 0 0   ╵ 1 1   ╵ 2 2 2 2 2    
-- 
cgit v1.2.3