Here are a few instances
const f = <L, R>(xs: Either<L, R>[]): Either<L, R[]> => { throw new Error('Not Implemented') };
const f = <T>(xs: Promise<T>[]): Promise<T[]> => { throw new Error('Not Implemented') };
const f = <T>(xs: Box<T>[]): Box<T[]> => { throw new Error('Not Implemented') };
All of these involve some form of reduction. However, the semigroup being used is simply a List.
When it comes to readability, what would be appropriate names for such functions?
There is an element of subjectivity here which is discouraged on this forum. Nonetheless, it could also be argued that a name can be objectively categorized as bad or good based on certain criteria/reasoning.
Perhaps something like collect
or gather
along those lines?