import { IEnumerable } from "../../types" ; import { BasicEnumerable } from "../BasicEnumerable" ; param source param action returns export const each = < TSource > ( source , action ) : IEnumerable < TSource > => { function * generator ( ) { for ( const value of source ) { action ( value ) ; yield value ; } } return new BasicEnumerable ( generator ) ; } ;