aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-13 13:07:24 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-13 13:07:24 -0400
commitdcbb72306821e0856c32944a54ea93902ef2949f (patch)
treeff2163ad907df0f64e49352936dc5c6c07c6903f /test
parentb6bcf214e638fd36ef7d76c9f573a84e6e016482 (diff)
Implement high-rank array notation [] (including destructuring)
Diffstat (limited to 'test')
-rw-r--r--test/cases/syntax.bqn10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cases/syntax.bqn b/test/cases/syntax.bqn
index 078369b8..aac53771 100644
--- a/test/cases/syntax.bqn
+++ b/test/cases/syntax.bqn
@@ -106,6 +106,16 @@
! % 0‿↩‿2
! % ⟨0,‿,2⟩
+# High-rank arrays
+! % []
+! % [⋄]
+1 % (↕3)≡[,0,1,2]
+1 % {[𝕩]≡≍𝕩}"ab"
+3 % [a⋄b]←↕2‿3⋄≠b
+! % [a,b,c]←↕2‿3
+1 % [a‿b‿c,[x,y,z]]←↕2‿3⋄x≡<⌽b
+3 % [[a,·],[·,b]]←2‿2‿1⥊↕4⋄-˜´a∾b
+
# Blocks
1 % {𝕩-1}2
4 % ({𝕩×𝕩})2