From 05a552e83ff523cdc6af6f04de12d676539d89ed Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 17 Feb 2021 18:15:29 -0500 Subject: Finish reference implementation fixes --- spec/reference.bqn | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'spec/reference.bqn') diff --git a/spec/reference.bqn b/spec/reference.bqn index 9387590c..983942df 100644 --- a/spec/reference.bqn +++ b/spec/reference.bqn @@ -86,18 +86,17 @@ _eachm←{ E←(≠r)⊸≤◶{r↩r𝕩_amend˜F𝕩⊑r⋄E𝕩+1}‿⊢ E 0 ⋄ (≢𝕩)⥊r } -id ← {(0⊑𝕨)˙⊸=◶𝕩‿(1⊑𝕨)}´ ⟨ +{ Identity ↩ 𝕨˙⊸=◶Identity‿𝕩 }´¨ ⟨ ×‿1, ¬‿1 ⌊‿∞ , ⌈‿¯∞ ∨‿0 , ∧‿1 ≠‿0 , =‿1 >‿0 , ≥‿1 - Identity ⟩ _fold←{ ! 1==𝕩 l←≠v←𝕩 ⋄ F←𝔽 - r←𝕨 (0𝕩}‿{ C←(<⟨⟩)⥊⊸∾⌜´⊢ # Cartesian array product ! IsArray 𝕩 @@ -417,12 +418,12 @@ IndexOf←{ c←1-˜=𝕨 ! 0≤c ! c≤=𝕩 - 𝕨 (0<≠𝕨)◶⟨0⎉c∘⊢,(+˝∧`)≢⎉c⎉c‿∞⟩ 𝕩 + 𝕨 ∧○(0<≠)⟜⥊◶⟨0⥊˜c-⊸↓≢∘⊢, (+˝∧`)≢⎉c⎉c‿∞⟩ 𝕩 } MarkFirst←{ ! 1≤=𝕩 u←0↑𝕩 - {⊑𝕩∊u}⊘{u↩u∾𝕩⋄1}‿0˘𝕩 + (0<≠)◶⟨⟨⟩,{⊑𝕩∊u}◶{u↩u∾𝕩⋄1}‿0˘⟩𝕩 } Find←{ r←=𝕨 @@ -465,6 +466,7 @@ _grade←{ _bins←{ c←1-˜=𝕨 ! 0≤c + ! c≤=𝕩 LE←𝔽⎉c≤0˜ ! (0<≠)◶⟨1,∧´·LE˝˘2↕⊢⟩𝕨 𝕨 (0<≠𝕨)◶⟨0⎉c∘⊢,+˝LE⎉¯1‿∞⟩ 𝕩 -- cgit v1.2.3