( it: Iterable<T>, fn: (t: T) => U, )
| 137 | } |
| 138 | |
| 139 | export function* mapIterable<T, U>( |
| 140 | it: Iterable<T>, |
| 141 | fn: (t: T) => U, |
| 142 | ): Iterable<U> { |
| 143 | for (const t of it) { |
| 144 | yield fn(t) |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | export type HRange = [number, number] // half-open [start, end[ i.e. end is exclusive |
| 149 |