From c6eaee8b153ac18d4faf6cf5daed8c531c5393cf Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 24 Jan 2021 15:10:31 -0500 Subject: Add shift functions, Rank, and Classify to Dyalog-BQN dictionary --- doc/fromDyalog.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/fromDyalog.md b/doc/fromDyalog.md index 201d22f4..a3c7c7a2 100644 --- a/doc/fromDyalog.md +++ b/doc/fromDyalog.md @@ -36,15 +36,20 @@ Dyalog uses value types (array, function, and so on) to determine syntax while B Here are some closest equivalents in Dyalog APL for the BQN functions that don't use the same glyphs as APL. Correspondence can be approximate, and `⌽` is just used as a decorator to mean "reverse some things". -| BQN | `⋆` | `√` | `∧` | `∨` | `¬` | `≠` | `<` | `>` | `≢` | `⥊` | `∾` | `≍` | -|:-----:|:---:|:--------:|:-----:|:-----:|:-----:|:---:|:---:|:---:|:---:|:---:|:-----:|:------:| -| Monad | `*` | `*∘(÷2)` | `[⍋]` | `[⍒]` | `~` | `≢` | `⊂` | `↑` | `⍴` | `,` | `⊃,⌿` | `↑,⍥⊂` | -| Dyad | `*` | `*∘÷⍨` | `∧` | `∨` | `1+-` | `≠` | `<` | `>` | `≢` | `⍴` | `⍪` | `↑,⍥⊂` | - -| BQN | `↑` | `↓` | `↕` | `/` | `⍋` | `⍒` | `⊏` | `⊑` | `⊐` | `⊒` | `∊` | `⍷` | `⊔` | -|:-----:|:----:|:-------:|:----:|:---:|:---:|:-----:|:----:|:---:|:---:|:---:|:---:|:---:|:----------:| -| Monad | `,⍀` | `⌽,⌽⍀⌽` | `⍳` | `⍸` | `⍋` | `⍒` | `⊣⌿` | `⊃` | | `…` | `≠` | `∪` | `⌸` | -| Dyad | `↑` | `↓` | `,⌿` | `⌿` | `⍸` | `⌽⍸⌽` | `⌷` | `⊃` | `⍳` | `…` | `∊` | `⍷` | `⌸` or `⊆` | +| BQN | `⋆` | `√` | `∧` | `∨` | `¬` | `=` | `≠` | `<` | `>` | `≢` | `⥊` | +|:-----:|:---:|:--------:|:-----:|:-----:|:-----:|:-----:|:---:|:---:|:---:|:---:|:---:| +| Monad | `*` | `*∘(÷2)` | `[⍋]` | `[⍒]` | `~` | `≢⍤⍴` | `≢` | `⊂` | `↑` | `⍴` | `,` | +| Dyad | `*` | `*∘÷⍨` | `∧` | `∨` | `1+-` | `=` | `≠` | `<` | `>` | `≢` | `⍴` | + +| BQN | `∾` | `≍` | `↑` | `↓` | `↕` | `»` | `«` | +|:-----:|:-----:|:------:|:----:|:-------:|:----:|:------------:|:-------------:| +| Monad | `⊃,⌿` | `↑,⍥⊂` | `,⍀` | `⌽,⌽⍀⌽` | `⍳` | `≢↑(¯1-≢)↑⊢` | `-⍤≢↑(1+≢)↑⊢` | +| Dyad | `⍪` | `↑,⍥⊂` | `↑` | `↓` | `,⌿` | `≢⍤⊢↑⍪` | `-⍤≢⍤⊢↑⍪⍨` | + +| BQN | `/` | `⍋` | `⍒` | `⊏` | `⊑` | `⊐` | `⊒` | `∊` | `⍷` | `⊔` | +|:-----:|:---:|:---:|:-----:|:----:|:---:|:-----:|:---:|:---:|:---:|:----------:| +| Monad | `⍸` | `⍋` | `⍒` | `⊣⌿` | `⊃` | `∪⍳⊢` | `…` | `≠` | `∪` | `⌸` | +| Dyad | `⌿` | `⍸` | `⌽⍸⌽` | `⌷` | `⊃` | `⍳` | `…` | `∊` | `⍷` | `⌸` or `⊆` | Modifiers are a little harder. Many have equivalents in some cases, but Dyalog sometimes chooses different functionality based on whether the operand is an array. In BQN an array is always treated as a constant function. -- cgit v1.2.3