1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 6x 22x 22x 75x 75x 22x 6x | import { Collection, asIterable } from './utils' import Sequence from './Sequence' function collect<T>(collection: Collection<T>) { const iterable = asIterable(collection) const result = [] for(const value of iterable) { result.push(value) } return result } export default collect |