mapi<B, C> method
Maps an iterable with an index and an optional option.
Implementation
Iterable<B> mapi<B, C>(
B Function(A e, int index, C? option) mapper, {
List<C> options = const [],
}) {
var index = 0;
return this.map((e) {
final option = options.length > index ? options[index] : null;
return mapper(e, index++, option);
});
}