diff options
Diffstat (limited to 'help')
| -rw-r--r-- | help/2-modifierrightoperand.md | 9 | ||||
| -rw-r--r-- | help/README.md | 30 | ||||
| -rw-r--r-- | help/assert_assertwithmessage.md | 2 | ||||
| -rw-r--r-- | help/beginblock.md | 25 | ||||
| -rw-r--r-- | help/beginexpression.md | 13 | ||||
| -rw-r--r-- | help/beginlist.md | 16 | ||||
| -rw-r--r-- | help/change.md | 15 | ||||
| -rw-r--r-- | help/comment.md | 14 | ||||
| -rw-r--r-- | help/currentfunction.md | 14 | ||||
| -rw-r--r-- | help/currentmodifier.md | 10 | ||||
| -rw-r--r-- | help/define.md | 15 | ||||
| -rw-r--r-- | help/endblock.md | 17 | ||||
| -rw-r--r-- | help/endexpression.md | 12 | ||||
| -rw-r--r-- | help/endlist.md | 14 | ||||
| -rw-r--r-- | help/export.md | 19 | ||||
| -rw-r--r-- | help/field.md | 11 | ||||
| -rwxr-xr-x | help/genhelp.bqn | 8 | ||||
| -rw-r--r-- | help/infinity.md | 14 | ||||
| -rw-r--r-- | help/leftargument.md | 9 | ||||
| -rw-r--r-- | help/minus.md | 14 | ||||
| -rw-r--r-- | help/modifierleftoperand.md | 9 | ||||
| -rw-r--r-- | help/nothing.md | 23 | ||||
| -rw-r--r-- | help/nullcharacter.md | 16 | ||||
| -rw-r--r-- | help/pi.md | 12 | ||||
| -rw-r--r-- | help/rightargument.md | 9 | ||||
| -rw-r--r-- | help/separator.md | 15 | ||||
| -rw-r--r-- | help/separator1.md | 15 | ||||
| -rw-r--r-- | help/strand.md | 16 | ||||
| -rw-r--r-- | help/system.md | 9 |
29 files changed, 400 insertions, 5 deletions
diff --git a/help/2-modifierrightoperand.md b/help/2-modifierrightoperand.md new file mode 100644 index 00000000..a85a552a --- /dev/null +++ b/help/2-modifierrightoperand.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/2-modifierrightoperand.html).* + +# Mathematical Double-struck G (`πΎ`) + +## `πΎ`: 2-Modifier Right operand + +A variable assigned to the right operand of a 2-modifier block. `π` can be used to access the right operand as a value. + + 5 +{π}3 1
\ No newline at end of file diff --git a/help/README.md b/help/README.md index 2d6d3cf1..d7c505d2 100644 --- a/help/README.md +++ b/help/README.md @@ -2,28 +2,44 @@ # REPL Help +Symbols are listed in alphabetical order of page name, ignoring syntactical roles. + | Symbol | Link | |--------|------| +| `πΎ` | [2-Modifier Right operand](2-modifierrightoperand.md) | | `\|` | [Absolute Value, Modulus](absolutevalue_modulus.md) | | `β` | [Bind, After, Dyadic After](after_bind.md) | -| `!` | [Assert, Dyad](assert_assertwithmessage.md) | +| `!` | [Assert, Assert With Message](assert_assertwithmessage.md) | | `β` | [Atop, Dyadic Atop](atop.md) | | `βΈ` | [Bind Left, Before, Dyadic Before](before_bind.md) | +| `{` | [Begin Block](beginblock.md) | +| `(` | [Begin Expression](beginexpression.md) | +| `β¨` | [Begin list](beginlist.md) | | `β` | [Catch](catch.md) | | `β` | [Ceiling, Maximum](ceiling_maximum.md) | | `Λ` | [Cells](cells.md) | +| `β` | [Change](change.md) | | `βΆ` | [Choose](choose.md) | | `β` | [Classify, Index Of](classify_indexof.md) | +| `#` | [Comment](comment.md) | | `+` | [Conjugate, Add](conjugate_add.md) | | `Λ` | [Constant](constant.md) | +| `π` | [Current Function](currentfunction.md) | +| `π£` | [Current Modifier](currentmodifier.md) | | `β·` | [Deduplicate, Find](deduplicate_find.md) | +| `β` | [Define](define.md) | | `β‘` | [Depth, Match](depth_match.md) | | `β` | [Depth](depth.md) | | `β₯` | [Deshape, Reshape](deshape_reshape.md) | | `Β¨` | [Each](each.md) | | `<` | [Enclose, Lesser Than](enclose_lessthan.md) | +| `}` | [End Block](endblock.md) | +| `)` | [End Expression](endexpression.md) | +| `β©` | [End list](endlist.md) | | `β` | [Enlist, Pair](enlist_pair.md) | | `β` | [Exponential, Power](exponential_power.md) | +| `β` | [Export Definition, Export names](export.md) | +| `.` | [Namespace Field](field.md) | | `β` | [First Cell, Select](firstcell_select.md) | | `β` | [First, Pick](first_pick.md) | | `β` | [Floor, Minimum](floor_minimum.md) | @@ -35,16 +51,23 @@ | `β£` | [Identity, Left](identity_left.md) | | `β’` | [Identity, Right](identity_right.md) | | `/` | [Indices, Replicate](indices_replicate.md) | +| `β` | [Infinity](infinity.md) | | `Λ` | [Insert, Insert With initial](insert.md) | | `βΎ` | [Join, Join](join_jointo.md) | +| `π¨` | [Left Argument](leftargument.md) | | `β ` | [Length, Not Equal To](length_notequals.md) | | `β€` | [Lesser Than or Equal To](lessthanorequalto.md) | | `β` | [Unique Mask, Member Of](markfirst_memberof.md) | | `>` | [Merge, Greater Than](merge_greaterthan.md) | +| `Β―` | [Minus](minus.md) | +| `π½` | [Modifier Left operand](modifierleftoperand.md) | | `-` | [Negate, Subtract](negate_subtract.md) | +| `Β·` | [Nothing](nothing.md) | | `Β¬` | [Logical Not, Span](not_span.md) | +| `@` | [Null Character](nullcharacter.md) | | `β` | [Occurrence Count, Progressive Index Of](occurrencecount_progressiveindexof.md) | | `β` | [Atop, Over](over.md) | +| `Ο` | [Pi](pi.md) | | `β` | [Prefixes, Take](prefixes_take.md) | | `β` | [Range, Windows](range_windows.md) | | `=` | [Rank, Equal To](rank_equals.md) | @@ -52,8 +75,11 @@ | `Γ·` | [Reciprocal, Divide](reciprocal_divide.md) | | `β` | [Repeat](repeat.md) | | `β½` | [Reverse, Dyad](reverse_rotate.md) | +| `π©` | [Right Argument](rightargument.md) | | `` ` `` | [Scan, Scan With initial](scan.md) | | `Λ` | [Self, Swap](self_swap.md) | +| `,` | [Separator](separator1.md) | +| `β` | [Separator](separator.md) | | `β’` | [Shape, Not Match](shape_notmatch.md) | | `Β»` | [Shift After, Shift After](shiftafter.md) | | `Β«` | [Shift Before, Shift Before](shiftbefore.md) | @@ -62,7 +88,9 @@ | `β¨` | [Sort Down, Logical Or](sortdown_or.md) | | `β§` | [Sort Up, Logical And](sortup_and.md) | | `β` | [Square root, Root](squareroot_root.md) | +| `βΏ` | [Strand](strand.md) | | `β` | [Suffixes, Drop](suffixes_drop.md) | +| `β’` | [System](system.md) | | `β` | [Each](table.md) | | `β` | [Transpose, Reorder Axes](transpose_reorderaxes.md) | | `βΎ` | [Under](under.md) | diff --git a/help/assert_assertwithmessage.md b/help/assert_assertwithmessage.md index fc90b367..ad11a8d3 100644 --- a/help/assert_assertwithmessage.md +++ b/help/assert_assertwithmessage.md @@ -15,7 +15,7 @@ Throw an error if `π©` is not 1. -## `π¨ ! π©`: Dyad +## `π¨ ! π©`: Assert With Message Throw an error with message `π¨` if `π©` is not 1. diff --git a/help/beginblock.md b/help/beginblock.md new file mode 100644 index 00000000..df6d58be --- /dev/null +++ b/help/beginblock.md @@ -0,0 +1,25 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginblock.html).* + +# Left Curly Bracket (`{`) + +## `{ ...`: Begin Block + +Starts a block, which can be one of: + +- Function +- 1-Modifier +- 2-Modifier +- Namespace +- Immediate Block + +Must end with a corresponding `}`. + + {π¨ + π©} # Function + + {π¨βΏπ½βΏπ©} # 1-modifier + + {π¨βΏπ½βΏπΎβΏπ©} # 2-modifier + + {a β 5} # Namespace + + {5+4+6} # Immediate block
\ No newline at end of file diff --git a/help/beginexpression.md b/help/beginexpression.md new file mode 100644 index 00000000..8284e04f --- /dev/null +++ b/help/beginexpression.md @@ -0,0 +1,13 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginexpression.html).* + +# Left Parenthesis (`(`) + +## `( ...`: Begin Expression + +Starts an expression, and only one expression. Must end with a corresponding `)`. + +`(` gives higher precedence to the expression in it, and BQN will evaluate expressions in `()` first. + + 1 + 2 - 3 + + (1 + 2) - 3
\ No newline at end of file diff --git a/help/beginlist.md b/help/beginlist.md new file mode 100644 index 00000000..7f0a51c0 --- /dev/null +++ b/help/beginlist.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/beginlist.html).* + +# Mathematical Left Angle Bracket (`β¨`) + +## `β¨ ...`: Begin list + +Starts a list. Inner elements must be separated by `,` or `β`. +Lists can be nested in other lists. + +Must end with a corresponding `β©`. + + β¨1, 2, 3β© + + β¨+ β - β 56β© + +
\ No newline at end of file diff --git a/help/change.md b/help/change.md new file mode 100644 index 00000000..d44d0a66 --- /dev/null +++ b/help/change.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/change.html).* + +# Leftwards Arrow With Hook (`β`) + +## `n β© v`: Change + +Changes the value of variable with name `n` to value `v`. + +Variable `n` must already exist. + + a β© 1 + + β’ b β 3 + + β’ b β© "Be the change you wish to see in the world."
\ No newline at end of file diff --git a/help/comment.md b/help/comment.md new file mode 100644 index 00000000..25943a31 --- /dev/null +++ b/help/comment.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/comment.html).* + +# Number Sign (`#`) + +## `#`: Comment + +Create a comment that extends till the end of a line. + +Anything written in comments is ignored. + + + 1 + 2 # + 3 + 4 + + "Hello world!" # this is ignored!
\ No newline at end of file diff --git a/help/currentfunction.md b/help/currentfunction.md new file mode 100644 index 00000000..f2c5e16d --- /dev/null +++ b/help/currentfunction.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/currentfunction.html).* + +# Mathematical Double-struck S (`π`) + +## `π`: Current Function + +A variable assigned to the current function block. `π€` can be used to access the current function block as a value. + +`π` can be used for recursion. + + F β {π 0: 1; π© Γ π π©-1} # Factorial + F 5 + + {π€βΏπ€}4
\ No newline at end of file diff --git a/help/currentmodifier.md b/help/currentmodifier.md new file mode 100644 index 00000000..f76cc98a --- /dev/null +++ b/help/currentmodifier.md @@ -0,0 +1,10 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/currentmodifier.html).* + +# Mathematical Double-struck R (`π£`) + +## `π£`: Current Modifier + +A variable assigned to the current modifier block. Underscores must be added to the beginning and/or end (`_π£`, `_π£_`) to use the modifier with the correct role. + + + +{π£β£π©} 4
\ No newline at end of file diff --git a/help/define.md b/help/define.md new file mode 100644 index 00000000..b36b5fc0 --- /dev/null +++ b/help/define.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/define.html).* + +# Leftwards Arrow (`β`) + +## `n β v`: Define + +Defines a new variable with name `n` and value `v`. + +Variable `n` must not already exist. + + β’ a β 1 + + β’ b β 3βΏ3 β₯ 5 + + C β β
\ No newline at end of file diff --git a/help/endblock.md b/help/endblock.md new file mode 100644 index 00000000..a10aa907 --- /dev/null +++ b/help/endblock.md @@ -0,0 +1,17 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endblock.html).* + +# Right Curly Bracket (`}`) + +## `... }`: End Block + +Starts a block, which starts with `}`. See [Begin Block](beginblock.md) for more details. + + {π¨ + π©} # Function + + {π¨βΏπ½βΏπ©} # 1-modifier + + {π¨βΏπ½βΏπΎβΏπ©} # 2-modifier + + {a β 5} # Namespace + + {5+4+6} # Immediate block
\ No newline at end of file diff --git a/help/endexpression.md b/help/endexpression.md new file mode 100644 index 00000000..d65f6520 --- /dev/null +++ b/help/endexpression.md @@ -0,0 +1,12 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endexpression.html).* + +# Right Parenthesis (`)`) + +## `... )`: End Expression + +The closing symbol for `(`. See [Begin Expression](beginexpression.md) for more details. + + + 1 + 2 - 3 + + (1 + 2) - 3
\ No newline at end of file diff --git a/help/endlist.md b/help/endlist.md new file mode 100644 index 00000000..9d698dcc --- /dev/null +++ b/help/endlist.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/endlist.html).* + +# Mathematical Right Angle Bracket (`β©`) + +## `... β©`: End list + +Ends a list started by a `β¨`. See [Begin List](beginlist.md) for more details. + + + β¨1, 2, 3β© + + β¨+ β - β 56β© + +
\ No newline at end of file diff --git a/help/export.md b/help/export.md new file mode 100644 index 00000000..39821667 --- /dev/null +++ b/help/export.md @@ -0,0 +1,19 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/export.html).* + +# Leftward Double Arrow (`β`) + +## `n β v`: Export Definition + +Define a variable with name `n` and export it from the current namespace or program's scope. + + ns β { exported β 5, unexported β 0} + ns.exported + ns.unexported + +## `π¨ β`: Export names + +Export the names given in `π©` from the current namespace or program's scope. Names must be defined. + + ns1 β { β¨alsoexportedβ©β, exported β 5, alsoexported β 0} + ns1.exported + ns1.alsoexported
\ No newline at end of file diff --git a/help/field.md b/help/field.md new file mode 100644 index 00000000..c866e0a8 --- /dev/null +++ b/help/field.md @@ -0,0 +1,11 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/field.html).* + +# Full Stop (`.`) + +## `ns . name`: Namespace Field + +Access a field with name `name` in namespace `ns`. Field must have been exported with `β`. + + {aβ1} . a + + {Fβ-}.F 5
\ No newline at end of file diff --git a/help/genhelp.bqn b/help/genhelp.bqn index cf50c939..b4a5b8c9 100755 --- a/help/genhelp.bqn +++ b/help/genhelp.bqn @@ -5,15 +5,17 @@ thing β { names β (β£βΎ", "βΎβ’)Β΄{(¬·β§`' 'βΈ=)βΈ/βΎβ½(2+β/':'=π©)βπ©}Β¨("## "β‘3βΈβ)Β¨βΈ/data tβΏd β βΎ/Β¨(βdata)=Β¨"()" sym β "`"βΎΛ"`"βΎ{'`':"` ` `"; '|':"\"βΎπ© ; π©}Β―3β2βdata - β’Show "| " βΎ sym βΎ " | [" βΎ names βΎ "]("βΎ((t+1)βdββdata)βΎ ") |" -}Β¨β’args + β’Show "| " βΎ sym βΎ " | [" βΎ names βΎ "]("βΎπ©βΎ ") |" +}Β¨β’args(Β¬ββ/β£)β¨"README.md"β© head β β¨ "*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*" β¨β© "# REPL Help" β¨β© +"Symbols are listed in alphabetical order of page name, ignoring syntactical roles." +β¨β© "| Symbol | Link |" "|--------|------|" β© -"index.md.tmp" β’FLines head βΎ thing #rename once you have a proper file.
\ No newline at end of file +"README.md" β’FLines head βΎ thing #rename once you have a proper file.
\ No newline at end of file diff --git a/help/infinity.md b/help/infinity.md new file mode 100644 index 00000000..5ea6cb3f --- /dev/null +++ b/help/infinity.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/infinity.html).* + +# Infinity (`β`) + +## `β`: Infinity + +Mathematical constant Infinity. Shares the same status as other numbers, can be negative (`Β―β`). + + + β + + Β―β + + 1+β
\ No newline at end of file diff --git a/help/leftargument.md b/help/leftargument.md new file mode 100644 index 00000000..3b179335 --- /dev/null +++ b/help/leftargument.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/leftargument.html).* + +# Mathematical Double-struck W (`π¨`) + +## `π¨`: Left Argument + +A variable assigned to the left argument of a block. `π` can be used to access the left argument as a function. + + 5 {π¨} 1
\ No newline at end of file diff --git a/help/minus.md b/help/minus.md new file mode 100644 index 00000000..2d85e1e7 --- /dev/null +++ b/help/minus.md @@ -0,0 +1,14 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/minus.html).* + +# Macron (`Β―`) + +## `Β―`: Minus + +Prefix before numbers to indicate that they are negative. + +Note that this is not the same as `-`, since it is part of the number, rather than a primitive that negates its value. + + + -1βΏ2βΏ3 + + Β―1βΏ2βΏ3
\ No newline at end of file diff --git a/help/modifierleftoperand.md b/help/modifierleftoperand.md new file mode 100644 index 00000000..2f23d37f --- /dev/null +++ b/help/modifierleftoperand.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/modifierleftoperand.html).* + +# Mathematical Double-struck F (`π½`) + +## `π½`: Modifier Left operand + +A variable assigned to the left operand of a modifier block. `π` can be used to access the left operand as a value. + + 5 +{πβ£π¨} 1
\ No newline at end of file diff --git a/help/nothing.md b/help/nothing.md new file mode 100644 index 00000000..b5ef7fe3 --- /dev/null +++ b/help/nothing.md @@ -0,0 +1,23 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nothing.html).* + +# Middle Dot (`Β·`) + +## `Β·`: Nothing + +### In Trains + +Nothing can serve as a left argument in a train to string together multiple monadic functions. + + (-+-) 5 + + (-Β·+-) 5 + +### In Block Headers + +For Block header pattern matching syntax, Nothing can be used to indicate an unused value. + + F β {π aβΏΒ·βΏb: aβΎb} + + F 1βΏ2βΏ3 + +
\ No newline at end of file diff --git a/help/nullcharacter.md b/help/nullcharacter.md new file mode 100644 index 00000000..b13eb3f0 --- /dev/null +++ b/help/nullcharacter.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/nullcharacter.html).* + +# Commercial At (`@`) + +## `@`: Null Character + +Null character, codepoint 0 in ASCII. Has the status of any other character. + +Can be added to any positive integer to get its character equivalent. + + + @+50 + + @ + + @+64
\ No newline at end of file diff --git a/help/pi.md b/help/pi.md new file mode 100644 index 00000000..0787e7ee --- /dev/null +++ b/help/pi.md @@ -0,0 +1,12 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/pi.html).* + +# Pi (`Ο`) + +## `Ο`: Pi + +Mathematical constant pi. Shares the same status as other numbers, can be negative (`Β―Ο`). + + + Ο + + Β―Ο
\ No newline at end of file diff --git a/help/rightargument.md b/help/rightargument.md new file mode 100644 index 00000000..69ec6394 --- /dev/null +++ b/help/rightargument.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/rightargument.html).* + +# Mathematical Double-struck X (`π©`) + +## `π©`: Right Argument + +A variable assigned to the right argument of a block. `π` can be used to access the right argument as a function. + + 5 {π©} 1
\ No newline at end of file diff --git a/help/separator.md b/help/separator.md new file mode 100644 index 00000000..9c02aa59 --- /dev/null +++ b/help/separator.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/separator.html).* + +# Diamond (`β`) + +## `β`: Separator + +Separates statements in blocksβ programs and arrays. + + a β 3 β β’ b β 2 + + 1 β 2 β 3 + + β¨1 β 2 β 3β© + + {1 β 2 β 3}
\ No newline at end of file diff --git a/help/separator1.md b/help/separator1.md new file mode 100644 index 00000000..90296f2f --- /dev/null +++ b/help/separator1.md @@ -0,0 +1,15 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/separator1.html).* + +# Comma (`,`) + +## `,`: Separator + +Separates statements in blocks, programs and arrays. + + a β 3 , β’ b β 2 + + 1 , 2 , 3 + + β¨1, 2, 3β© + + {1, 2, 3}
\ No newline at end of file diff --git a/help/strand.md b/help/strand.md new file mode 100644 index 00000000..9866f79b --- /dev/null +++ b/help/strand.md @@ -0,0 +1,16 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/strand.html).* + +# Undertie (`βΏ`) + +## `βΏ`: Strand + +Create a list via [strand notation](../doc/arrayrepr.md#strands). + +Placing `βΏ` between valid BQN expressions will create a list out of the end results of those expressions. + + + 1βΏ2βΏ3 + + +βΏ-βΏ56 + +
\ No newline at end of file diff --git a/help/system.md b/help/system.md new file mode 100644 index 00000000..79b1d745 --- /dev/null +++ b/help/system.md @@ -0,0 +1,9 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/system.html).* + +# Bullet (`β’`) + +## `β’`: System + +A prefix for system functions. `β’listSys` gives a list of system values added in any BQN implementation. + +`β’` is ignored when determining the role of the system value. |
