From 60d51c85dd306989e919e91e37d9b94fe60411c2 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 22 Aug 2020 09:47:16 -0400 Subject: Add REPL links to documentation code blocks --- 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 6b595caf..ae600d17 100644 --- a/docs/doc/join.html +++ b/docs/doc/join.html @@ -3,11 +3,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.

@@ -17,7 +17,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