From 59bbbbf0b2702906cdd1b08429b9712b7c77d39a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 25 Jan 2021 22:16:23 -0500 Subject: Translate some J modifiers --- docs/doc/fromJ.html | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/doc/fromJ.html b/docs/doc/fromJ.html index 72d4f59b..432bf72f 100644 --- a/docs/doc/fromJ.html +++ b/docs/doc/fromJ.html @@ -279,6 +279,7 @@ + @@ -291,6 +292,7 @@ &.: : @. +:: @@ -383,6 +385,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
J~@:&:&.::/"L:^:
BQN˜˝

Additionally, |.!.f is f« with a natural number left argument. Change « to » to rotate right instead of left.

The tables below give approximate implementations of J primitives. J has a whole lot of complicated primitives that no one uses (some of which are officially deprecated), so not everything is translated here.

@@ -546,7 +578,7 @@ - + @@ -566,3 +598,57 @@
i. ((↕×´) for lists)
+

Some J modifier expressions are translated below. BQN doesn't keep track of the rank of functions, so the "close" compositions @ & &. have no BQN equivalents: instead, specify a rank after composing.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
JBQN
&.>¨
F`G`H@.CCF,G,H
x y} zx(y) z
F/ .GF˝G1 (dyadic)
+

BQN uses functions, not modifiers, for structural manipulation. The following table gives BQN functions corresponding to J's structural modifiers. The result is an array of arrays; use F¨ to apply a function to each of these, and >F¨ to apply a function and merge the results into a single array.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
JMonadDyad
/.(+⌜´¨)
\1↓↑<˘
\.¯1↓↓
-- cgit v1.2.3