(m: Matrix<T>)
| 1 | type Matrix<T> = T[][]; |
| 2 | |
| 3 | export function shallowClone<T>(m: Matrix<T>): Matrix<T> { |
| 4 | const _m_ = m.length; |
| 5 | |
| 6 | const res: Matrix<T> = new Array<T[]>(_m_); |
| 7 | |
| 8 | for (let i = 0; i < _m_; ++i) { |
| 9 | res[i] = m[i].slice(0); |
| 10 | } |
| 11 | |
| 12 | return res; |
| 13 | } |
| 14 | |
| 15 | export function traverse2<T1, T2>( |
| 16 | a1: T1[], |
no outgoing calls
no test coverage detected
searching dependent graphs…