User:⊂⍺m: Difference between revisions

Jump to navigation Jump to search
Line 46: Line 46:
           assert←{⍺←'LENGTH ERROR: one frame must be a prefix of the other' ⋄ 0∊⍵:⍺ ⎕SIGNAL 8 ⋄ void←0}
           assert←{⍺←'LENGTH ERROR: one frame must be a prefix of the other' ⋄ 0∊⍵:⍺ ⎕SIGNAL 8 ⋄ void←0}
           r←1↓⌽3⍴⌽⍵⍵                      ⍝ dyadic ranks
           r←1↓⌽3⍴⌽⍵⍵                      ⍝ dyadic ranks
           rm←r⌊∘(≢⍴)¨⍺ ⍵                  ⍝ modified ranks; rm⍲.(≢⍴)¨⍺ ⍵
           rm←r⌊∘(≢⍴)¨⍺ ⍵                  ⍝ modified ranks; rm⍲.>(≢⍴)¨⍺ ⍵
           lf rf←(-rm)↓¨⍴¨⍺⍵              ⍝ frames
           lf rf←(-rm)↓¨⍴¨⍺⍵              ⍝ frames
           cf←lf{⍺<⍥≢⍵:⍺ ⋄ ⍵}rf            ⍝ common frame, assuming frames agree
           cf←lf{⍺<⍥≢⍵:⍺ ⋄ ⍵}rf            ⍝ common frame, assuming frames agree