(state: Collection[], id: number, f: (c: Collection) => void)
| 174 | } |
| 175 | |
| 176 | function modifyCollection(state: Collection[], id: number, f: (c: Collection) => void) { |
| 177 | const s = JSON.parse(JSON.stringify(state)); |
| 178 | mod(s, id, f); |
| 179 | return s; |
| 180 | } |
| 181 | |
| 182 | function mod(collections: Collection[], id: number, f: (c: Collection) => void) { |
| 183 | for (let i = 0; i < collections.length; i++) { |
no test coverage detected