diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-21 16:13:18 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-01-21 20:24:20 -0500 |
| commit | 0000f894faae0daf7a3ee362abc9054697b513e4 (patch) | |
| tree | f560ed51d1d00ccc91862312d11e421e99bcfde7 /src | |
| parent | 8f65897a240e567b6bf09f440b7748a59d03bad6 (diff) | |
Fill support for ⌜ and ¨ when 𝔽 is monadic =≠≡≢ even if the argument has no fill
Diffstat (limited to 'src')
| -rw-r--r-- | src/r.bqn | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -168,9 +168,9 @@ SelSub←{ } First ← (0<≠)◶⟨Fill,0⊸⊑⟩ Deshape +IsPure ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d} _fillByPure_←{ - p ← {d←Decompose𝕩 ⋄ 2⊸≤◶⟨≤⟜0, 1(𝕊d⊑˜1⊸+)⊸×´·↕1-˜≠∘d⟩0⊑d} 𝕘 - p⊑⟨𝕗,𝕗_fillBy_𝕘⟩ + 𝕘 {(𝕨HomFil𝕩)_fillBy_𝕨}⍟(IsPure⊣) 𝕗 } ¨ ↩ {𝕨𝔽⌜⊘(𝔽_eachd)_fillByPure_𝔽○ToArray𝕩} @@ -429,6 +429,7 @@ identity ← {(0⊑𝕨)˙⊸=◶𝕩‿(1⊑𝕨)}´ ⟨ >‿0 , ≥‿1 "´: Identity not found"!0˙ ⟩ +HomFil ← {((𝕎0) Fill 𝕏)⊘𝕏}⍟(+´⟨=,≠,≡,≢⟩=⊣) Reshape←{ "𝕨⥊𝕩: 𝕨 must have rank at most 1" ! 1≥=𝕨 |
