diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-12-31 21:59:48 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-12-31 21:59:48 -0500 |
| commit | dac3a40a2a06aa0b5dbe2d17b217b2d1007a707d (patch) | |
| tree | c5a1cfe63cc78518c179706fc0817e45fb765ae4 /src/r.bqn | |
| parent | 785f1eef53c8fa531cfc0403ffe1d82500e9ba95 (diff) | |
Use shaped identities for arithmetic Insert and support ∾
Diffstat (limited to 'src/r.bqn')
| -rw-r--r-- | src/r.bqn | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -394,7 +394,9 @@ _rankOp_←{ } _insert←{ "˝: 𝕩 must have rank at least 1" ! 1≤=𝕩 - 𝕨 𝔽´ <˘𝕩 + F←𝔽 + Id ← {s←1 Drop ≢𝕩 ⋄ s joinPrim˙⊸≠◶⟨(0<↕∘≠)⊸×⊸⥊⟜⟨⟩, Reshape⟜Identity⟩ f} + 𝕨 (0<≠)⊘1◶Id‿{𝕨F´<˘𝕩} 𝕩 } ˝ ← _insert @@ -588,6 +590,7 @@ _repeat_←{ } ReshapeT ← ⟨∘,⌊,⌽,↑⟩⊑∘⊐< +JoinPrim ← ∾ ⍟ ↩ _repeat_ ⥊ ↩ Deshape ⊘ Reshape |
