From dcbb72306821e0856c32944a54ea93902ef2949f Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 13 Jun 2022 13:07:24 -0400 Subject: Implement high-rank array notation [] (including destructuring) --- test/cases/syntax.bqn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 -- cgit v1.2.3