const flatMapIterable = function* flatMapIterable(iterable, mapper) {
  if (mapper) {
    for (const item of iterable) {
      yield* mapper(item);
    }