aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-12-14 11:20:35 -0500
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-12-14 11:20:35 -0500
commit2cf9d472ae7860ca646a78b3577e5c1fa46037c3 (patch)
treeb8c90a994731212b70277a3661b7fa59d711eaf3 /src
parent3720fb2c1d1ad9c556d61ea69275382a58d7b94f (diff)
Make Mix and Join return the argument if it's empty and has no fill
Diffstat (limited to 'src')
-rw-r--r--src/r1.bqn3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/r1.bqn b/src/r1.bqn
index ffa926d1..6faf7897 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -399,7 +399,8 @@ Depth←IsArray◶0‿{1+0⌈´Depth⌜⥊𝕩}
IF ← ⊢⊣!∘≡ # Intersect fill
IEF← (0<≠)◶⟨⊢_fillBy_ Fill, ⊢_fillBy_ IF´⟩∘⥊
-_fillMerge_ ← {(0<≠∘⥊)◶⟨(𝔾○≢⥊⟨⟩˙)_fillBy_⊢⟜Fill, 𝔽 ⊣_fillBy_⊢ IEF⟩}
+HasFill ← 0=·Fill⊢_fillBy_(@⍟(3≤Type∘⊣))⟜(↕0)
+_fillMerge_ ← {(0<≠∘⥊)◶⟨(𝔾○≢⥊⟨⟩˙)_fillBy_⊢⟜Fill⍟HasFill, 𝔽 ⊣_fillBy_⊢ IEF⟩}
Merge←{
c←≢0⊑⥊𝕩
(">𝕩: Elements of 𝕩 must have matching shapes" ! c =○≠◶0‿MatchS ≢)⌜⥊𝕩