diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-13 14:24:55 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-13 14:24:55 -0500 |
| commit | 80060dfab6cc93719b27b6f8ff3f3c5138f33781 (patch) | |
| tree | d15b1b5c137966718c88fe178be98fbda7bbbcab /src | |
| parent | 2f1af470e07f3785ba0c98794458dc570288b615 (diff) | |
Allow reaching into atoms by boxing them in structural Under
Diffstat (limited to 'src')
| -rw-r--r-- | src/r.bqn | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -172,6 +172,7 @@ _under_←{ Captures←IsArray∘⊣◶⟨1, {𝕨◶0‿𝕩}´⟨IsArray⊢, =○=, 1×´=¨○≢, {1×´⥊𝕨Captures¨𝕩}⟩⟩ Set←{ Set1←𝕨⊸{ + 𝕩↩<⍟(1-IsArray)𝕩 i←↕l←1×´s←≢𝕩 nv‿gi←((IsArray 𝕨)⊑{⟨𝕩⟩}‿⥊)¨ v‿𝕨 ! 1×´Nat⌜gi @@ -196,7 +197,7 @@ Recompose ← ⊣◶⟨ ⟩ _structural←{ E←StructErr˙ - Inds ← ⥊⟜(↕1×´⊢)∘≢⍟(1-IsStructErr) 𝕩 IsArray∘⊢◶⟨E,⊑⟜⥊⟩´ Reverse + Inds ← IsArray◶⟨0,⥊⟜(↕1×´⊢)≢⟩ 𝕩 ⊑⟜⥊⍟(IsArray⊢)´ Reverse _s_ ← { f←𝕗 st‿d‿o←𝕩 |
