(iterable: Iterable<T>, fn: Func<T, Maybe<U>>)
| 64 | } |
| 65 | |
| 66 | static filterMap<T, U>(iterable: Iterable<T>, fn: Func<T, Maybe<U>>): U[] { |
| 67 | const result: Array<U> = [] |
| 68 | for (const value of iterable) { |
| 69 | const mapped: Maybe<U> = fn(value) |
| 70 | if (isDefined(mapped)) {result.push(mapped)} |
| 71 | } |
| 72 | return result |
| 73 | } |
| 74 | |
| 75 | static reverse<T>(iterable: Iterable<T>): Iterable<T> { |
| 76 | const result: T[] = [] |
no test coverage detected