diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-11 14:58:27 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-02-11 14:58:27 -0500 |
| commit | ae8d0791777e9ff3e43569089ddd446b666ac626 (patch) | |
| tree | 51a9ceac3d9550e9ab40799b4d63ee496409dae6 /spec/reference.bqn | |
| parent | f07e748444200bad23c6a44a30af82bc7b7c8e48 (diff) | |
Allow a left argument to Scan (`)
Diffstat (limited to 'spec/reference.bqn')
| -rw-r--r-- | spec/reference.bqn | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/reference.bqn b/spec/reference.bqn index 40cbefb9..288fdc39 100644 --- a/spec/reference.bqn +++ b/spec/reference.bqn @@ -242,11 +242,15 @@ _scan←{ ! IsArray 𝕩 ! 1≤=𝕩 F←𝔽 - (0<≠∘⥊)◶⊢‿{ - r←⥊𝕩 ⋄ l←≠𝕩 ⋄ c←×´1 Cell 𝕩 - {r↩r𝕩_amend˜𝕨F○(⊑⟜r)𝕩}⟜(c⊸+)¨↕c-˜≠r + cs←1 Cell 𝕩 + ! (cs≡≢)𝕨 + l←≠r←⥊𝕩 + 𝕨 (0<l)◶⊢‿{ + c←×´cs + {r↩≥⟜c◶⟨⊑⟜(⥊𝕩)⊸F⋄⊢⟩⟜(⊑⟜r)¨↕l}𝕨 + {r↩r𝕩_amend˜𝕨F○(⊑⟜r)𝕩}⟜(c⊸+)¨↕l-c (≢𝕩)⥊r - }𝕩 + } 𝕩 } _repeat_←{ n←𝕨𝔾𝕩 |
