Difference between revisions of "BQN"

From APL Wiki
Jump to navigation Jump to search
(Add forum link)
(→‎Functions: Link for Select)
Line 101: Line 101:
| <code>⍒</code> || [[Grade|Grade Down]]      || [[Interval_Index|Bins Down]]
| <code>⍒</code> || [[Grade|Grade Down]]      || [[Interval_Index|Bins Down]]
| <code>⊏</code> || First Cell                || Select
| <code>⊏</code> || First Cell                || [[Select]]
| <code>⊑</code> || [[First]]                || Pick
| <code>⊑</code> || [[First]]                || Pick

Revision as of 12:12, 13 May 2021

BQN is an APL-family language designed primarily by Marshall Lochbaum. Although it maintains the concept of array-driven computing and much of APL's array functionality, BQN discards all compatibility with other array languages and changes many fundamental concepts. It uses the based array model with dedicated array notation, distinguishes between data types and expression roles to give the language a context-free grammar with first-class functions, and uses a new set of glyphs with different primitive pairings. The language uses the leading axis model and tacit programming as core paradigms. Its implementation is largely self-hosted, with an array-based compiler like Co-dfns.



Glyph Monadic Dyadic
+ Conjugate Add
- Negate Subtract
× Sign Multiply
÷ Reciprocal Divide
Exponential Power
Square Root Root
Floor Minimum
Ceiling Maximum
Sort Up And
Sort Down Or
¬ Not Span
| Absolute Value Modulus
Less Than or Equal to
< Enclose Less Than
> Merge Greater Than
Greater Than or Equal to
= Rank Equals
Length Not Equals
Depth Match
Shape Not Match
Identity Left
Identity Right
Deshape Reshape
Join Join to
Solo Couple
Prefixes Take
Suffixes Drop
Range Windows
» Nudge Shift Before
« Nudge Back Shift After
Reverse Rotate
Transpose Reorder axes
/ Indices Replicate
Grade Up Bins Up
Grade Down Bins Down
First Cell Select
First Pick
Classify Index of
Occurrence Count Progressive Index of
Unique Mask Member of
Deduplicate Find
Group Indices Group


1-modifiers in BQN use superscript symbols, while 2-modifiers use symbols with a circle, but not one with a line through it like and .

Glyph Name(s)
˙ Constant
˜ Self/Swap
˘ Cells
¨ Each
´ Fold
˝ Insert
` Scan
Glyph Name(s)


APL dialects [edit]
Maintained APL+WinAPL2APL64APL\ivApletteAprilCo-dfnsDyalog APLdzaima/APLExtended Dyalog APLGNU APLKAPNARS2000Pometo
Historical Iverson notationA Programming LanguageA+ (A) ∙ APL#APL\360APL/700APL\1130APL\3000APL.68000APL*PLUSAPL.jlAPL.SVAPLXIVSYS/7090NARSngn/aplopenAPLPATRowanSAXSHARP APLVisualAPL (APLNext) ∙ VS APLYork APL
Derivatives AHPLBQNCoSyELIGleeIIvyJJellyJellyfishK (Q, KDB+) ∙ NialRADRemoraQube
Overviews Timeline of array languagesTimeline of influential array languagesFamily tree of array languages