⍝ Regression.tc
⍝ ----------------------------------

      ⍝ problem reported by Hyperborius


∇ r ← smallestFactor n
    r ← (0 = r) + r ← 1 ↑ (0 = r | n) / r ← 1 ↓ ⍳ n
∇

∇ r ← factors n; sf
    r ← ⍳ 0
    → (1 = n) / 0
    r ← sf, factors n ÷ sf ← smallestFactor n
∇

∇ r ← c count iter
    r ← +/ (c = iter) / 1
∇

      ×/ twenty * ⌈/ twenty ∘.count facs ← factors ¨ twenty ← 1 ↓ ⍳ 20 
232792560

      ×/ twenty * ⌈/ twenty ∘.count factors ¨ twenty ← 1 ↓ ⍳ 20
232792560



      ⍝ stale value when indexing
      ⍝
      )CHECK
OK      - no stale functions
OK      - no stale values
OK      - no stale indices
OK      - no duplicate parents


      (4 4⍴4)[2;2]
4
      )CHECK
OK      - no stale functions
OK      - no stale values
OK      - no stale indices
OK      - no duplicate parents



