From ab94ef9c46883f5c3b2a6d4561dad840f09c5caa Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 24 Jan 2021 19:55:58 -0500 Subject: Add section on syntax to BQN-Dyalog dictionary --- docs/doc/fromDyalog.html | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'docs') diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html index 68e4758f..f9c7eeaa 100644 --- a/docs/doc/fromDyalog.html +++ b/docs/doc/fromDyalog.html @@ -69,6 +69,46 @@ +

Syntax

+

BQN comments are written with #, not . BQN strings use double quotes "" while single quotes '' enclose a character.

+

BQN's functions use {}, like Dyalog's dfns. The names for inputs and self-reference are different:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DyalogBQN
𝕨
𝕩
𝕊
⍺⍺𝔽
⍵⍵𝔾
∇∇𝕣
+

BQN doesn't have guards: it uses modifiers or control structures instead. However, BQN function and modifier blocks have headers that allow pattern matching. See the block documentation.

+

The assignment arrow defines a new variable in a block, while modifies an existing one.

+

BQN uses the ligature character for stranding, instead of plain juxtaposition. It also has a list notation using ⟨⟩.

For reading

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".

-- cgit v1.2.3