Skip to content

Commit

Permalink
Fix handling of structural mismatch at depth in Under
Browse files Browse the repository at this point in the history
  • Loading branch information
mlochbaum committed Dec 11, 2024
1 parent a3b1a41 commit aecb56a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/bqn.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/r1.bqn
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ under←{
}
_at_ ← {(↕≠𝕩)𝔽((𝔾𝕩)=⊣)¨𝕩}
Set0{ (𝕨≥≠root)≢⥊(1+𝕨)⊸𝕊_at_(𝕨root˙), Set1_fillBy_ 𝕩 }
IsArrayroot0v˙, Setx
IsArrayroot0v˙, 𝕘0,0´IsErrvSet,Err˙x
}

_indRec ← {
Expand All @@ -534,7 +534,8 @@ under←{
val𝕨𝔽𝔾𝕩
s𝕘 SFN{𝕎𝕩} InitS 𝕩
rootind‿⟨d,rec⟩ ← IsStruct0Err‿⟨0,0⟩,0231⊑Decomposes
IsErrroot𝕩 _insert_ rec, {𝕏valInverse𝔾˙vald GetInserts ind
Comp ← {𝕏valInverse𝔾˙
IsErrCompIsErr root𝕩 _insert_ rec, Compvald GetInserts ind
}
}

Expand Down
1 change: 1 addition & 0 deletions test/cases/under.bqn
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@
-2 % (2-) 3
+ ⌾∘+ 1
0.5 % ÷2(1-˜÷) 0.5
"sa"⟩‿⟨"fd" ¨(¨) "as""df"

0 comments on commit aecb56a

Please sign in to comment.