diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-04-16 17:46:04 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-04-16 17:46:04 -0400 |
| commit | 5ed42f60312b87a1c85f701ed21d9d07181171e1 (patch) | |
| tree | 96f6d9612d1ff085553b69605090d495b415425d /spec/reference.bqn | |
| parent | 7de47f9a7db71a179ba3124d39cc2c5be2000fd4 (diff) | |
Merge and Join with empty no-fill argument return it unchanged
Diffstat (limited to 'spec/reference.bqn')
| -rw-r--r-- | spec/reference.bqn | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/reference.bqn b/spec/reference.bqn index a9d2ef44..b6a06d29 100644 --- a/spec/reference.bqn +++ b/spec/reference.bqn @@ -34,6 +34,7 @@ _amend # {𝕨˙⌾(𝕗⊸⊑)𝕩} Identity # Left or right identity of function 𝕏 ⁼ # Inverse of function 𝔽 Fill # Enclosed fill value for 𝕩 +HasFill # Whether 𝕩 has a fill value #⌜ @@ -211,7 +212,7 @@ Depth←IsArray◶0‿{1+0⌈´Depth¨⥊𝕩} DropV← {⊑⟜𝕩¨𝕨+↕𝕨-˜≠𝕩} Cell ← DropV⟜≢ -Merge←(0<≠∘⥊)◶((∾○≢⥊⊢)⟜Fill)‿{ +Merge←(0<≠∘⥊)◶((∾○≢⥊⊢)⟜Fill⍟HasFill)‿{ c←≢⊑𝕩 ! ∧´⥊(c≡≢)¨𝕩 𝕩⊑⟜ToArray˜⌜↕c @@ -377,7 +378,7 @@ Replicate ← {0<=𝕨}◶(⥊˜⟜≠Rep⊢)‿{!𝕨=○≠𝕩⋄𝕨Rep𝕩} { Identity ↩ 𝕨˙⊸=◶Identity‿𝕩 }´¨ ⟨ ∨‿0 , ∧‿1 ⟩ -JoinEmpty ← ({!𝕨≤○≠𝕩⋄𝕨≠⊸((𝕨×≠⊸↑)∾↓)𝕩}○≢⥊⊢)⟜Fill +JoinEmpty ← ({!𝕨≤○≠𝕩⋄𝕨≠⊸((𝕨×≠⊸↑)∾↓)𝕩}○≢⥊⊢)⟜Fill⍟HasFill Join←(0<≠∘⥊)◶⟨JoinEmpty, (0<=)◶{!IsArray𝕩⋄>𝕩}‿{ ! IsArray 𝕩 |
