From b035e1ef01049add0c3301cc2fa87ae30dc4e461 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 28 Mar 2022 21:51:08 -0400 Subject: Fix depth-2 expansion of structure already at depth 1 --- src/r1.bqn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/r1.bqn') diff --git a/src/r1.bqn b/src/r1.bqn index e34d28ba..98df23e9 100644 --- a/src/r1.bqn +++ b/src/r1.bqn @@ -377,7 +377,7 @@ under←{ Expand ← { f‿a‿i‿q←𝕩 ⋄ e←i⊑⥊a - Expand2⍟(2=𝕨) ⟨IsArray◶⟨⟨⟩,∾⟜⟨i⟩⟩f,e,IsArray◶⟨0,@Fill⥊⟜(↕1×´⊢)∘≢⟩e,q⟩ + ⟨IsArray◶⟨⟨⟩,∾⟜⟨i⟩⟩f,e,IsArray◶⟨0,@Fill⥊⟜(↕1×´⊢)∘≢⟩e,q⟩ }⍟(>⟜(IsArray 2⊑⊢)) Expand2 ← { xf‿xa‿xi‿xq ← 𝕩 @@ -386,7 +386,7 @@ under←{ } _s ← { ⟨st,d‿o⟩←𝕩 # Function, input depth, output is structural - f‿a‿i‿⟨q,r⟩←d Expand 𝕗 # Path, array reference, indices, info + f‿a‿i‿⟨q,r⟩←Expand2⍟(2=d) (0