diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/README.md | 2 | ||||
| -rw-r--r-- | doc/context.md | 2 | ||||
| -rw-r--r-- | doc/depth.md | 2 | ||||
| -rw-r--r-- | doc/fromDyalog.md | 2 | ||||
| -rw-r--r-- | doc/functional.md | 2 | ||||
| -rw-r--r-- | doc/group.md | 2 | ||||
| -rw-r--r-- | doc/indices.md | 2 | ||||
| -rw-r--r-- | doc/join.md | 2 | ||||
| -rw-r--r-- | doc/logic.md | 2 | ||||
| -rw-r--r-- | doc/transpose.md | 2 | ||||
| -rw-r--r-- | doc/windows.md | 2 |
11 files changed, 22 insertions, 0 deletions
diff --git a/doc/README.md b/doc/README.md index 8636b23c..142b3f9c 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/index.html).* + # BQN documentation Here is the documentation for BQN, describing what features BQN has, how to use them (with examples), and why they were chosen. As it is considerably more in-depth than the [specification](../spec/README.md), the documentation is much less complete. The following pages are present now: diff --git a/doc/context.md b/doc/context.md index e3328fc8..fe800cfa 100644 --- a/doc/context.md +++ b/doc/context.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/context.html).* + # BQN's context-free grammar APL has a problem. To illustrate, let's look at an APL expression: diff --git a/doc/depth.md b/doc/depth.md index a901982c..855ca6ab 100644 --- a/doc/depth.md +++ b/doc/depth.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/depth.html).* + # Depth The depth of an array is the greatest level of array nesting it attains, or, put another way, the greatest number of times you can pick an element starting from the original array before reaching a non-array. The monadic function Depth (`≡`) returns the depth of its argument, while the 2-modifier Depth (`⚇`) can control the way its left operand is applied based on the depth of its arguments. Several primitive functions also use the depth of the left argument to decide whether it applies to a single axis of the right argument or to several axes. diff --git a/doc/fromDyalog.md b/doc/fromDyalog.md index 9af9555c..3eaf752d 100644 --- a/doc/fromDyalog.md +++ b/doc/fromDyalog.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/fromDyalog.html).* + # BQN–Dyalog APL dictionary A few tables to help users of Dyalog APL (or similar) get started quickly on BQN. Here we assume `⎕ML` is 1 for Dyalog. diff --git a/doc/functional.md b/doc/functional.md index 45614904..c3dae74c 100644 --- a/doc/functional.md +++ b/doc/functional.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/functional.html).* + # Functional programming BQN boasts of its functional capabilities, including first-class functions. What sort of functional support does it have, and how can a BQN programmer exercise these and out themself as a Schemer at heart? diff --git a/doc/group.md b/doc/group.md index 197e8977..2790a851 100644 --- a/doc/group.md +++ b/doc/group.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/group.html).* + # Group BQN replaces the [Key](https://aplwiki.com/wiki/Key) operator from J or Dyalog APL, and [many forms of partitioning](https://aplwiki.com/wiki/Partition_representations), with a single (ambivalent) Group function `⊔`. This function is somewhat related to the K function `=` of the same name, but results in an array rather than a dictionary. diff --git a/doc/indices.md b/doc/indices.md index 0634087d..cc7c5f67 100644 --- a/doc/indices.md +++ b/doc/indices.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/indices.html).* + # Indices One-dimensional arrays such as K lists or Python arrays have only one kind of index, a single number that refers to an element. For multidimensional arrays using the leading axis theory, there are several types of indexing that can be useful. Historically, nested APL designs have equivocated between these, which I believe can lead to subtle errors when programming. BQN focuses on single-number (depth 0) indices, which can refer to list elements or array major cells (or more generally indexing along any particular axis). When using this kind of element index, indexed arrays are required to be lists. Only two functions allow the use of list element indices: Range (`↕`), which can accept a list argument, and Pick (`⊑`), which uses the depth-1 arrays in its left argument as index scalars or lists. Others use single-number indices to refer to cells. diff --git a/doc/join.md b/doc/join.md index 31ec3876..c7603628 100644 --- a/doc/join.md +++ b/doc/join.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/join.html).* + # Join Join (`∾`) is an extension of the monadic function [Raze](https://aplwiki.com/wiki/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 (`≍`): `a≍b` is `>a‿b` and `a∾b` is `∾a‿b`. 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. diff --git a/doc/logic.md b/doc/logic.md index 638bdace..13a9c3b2 100644 --- a/doc/logic.md +++ b/doc/logic.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/logic.html).* + # Logic functions: And, Or, Not (also Span) BQN retains the APL symbols `∧` and `∨` for logical *and* and *or*, and changed APL's `~` to `¬` for *not*, since `~` looks too much like `˜` and `¬` is more common in mathematics today. Like J, BQN extends Not to the linear function `1⊸-`. However, it discards [GCD](https://aplwiki.com/wiki/GCD) and [LCM](https://aplwiki.com/wiki/LCM) as extensions of And and Or, and instead uses bilinear extensions: And is identical to Times (`×`), while Or is `×⌾¬`, following De Morgan's laws (other ways of obtaining a function for Or give an equivalent result—there is only one bilinear extension). diff --git a/doc/transpose.md b/doc/transpose.md index 73653e0e..a00ff28c 100644 --- a/doc/transpose.md +++ b/doc/transpose.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/transpose.html).* + # Transpose As in APL, Transpose (`⍉`) is a tool for rearranging the axes of an array. BQN's version is tweaked to align better with the leading axis model and make common operations easier. diff --git a/doc/windows.md b/doc/windows.md index 82397a42..e82b9e6b 100644 --- a/doc/windows.md +++ b/doc/windows.md @@ -1,3 +1,5 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/doc/windows.html).* + # Windows In BQN, it's strongly preferred to use functions, and not modifiers, for array manipulation. Functions are simpler as they have fewer moving parts. They are more concrete, since the array results can always be viewed right away. They are easier to implement with reasonable performance as well, since there is no need to recognize many possible function operands as special cases. |
