[PATCH] D85698: [ADT] Add an version of llvm::join that takes a callable for non-string iterable

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 13:22:17 PDT 2020


dblaikie added a comment.

In D85698#2208785 <https://reviews.llvm.org/D85698#2208785>, @ychen wrote:

> In D85698#2208716 <https://reviews.llvm.org/D85698#2208716>, @dblaikie wrote:
>
>> Perhaps this should be built by composition with some kind of range transformer (not sure if we have one of those already - maybe we do?), rather than having explicit support in join?
>
> I'm not sure we have anything in-tree to use. I was thinking this as something like `std::find_if` for `std::find`. Just for convenience and save a temporary container. To use composition without adding a join overload, we need something like python yield?

Ah, that's what I was thinking of - join+map_range?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85698/new/

https://reviews.llvm.org/D85698



More information about the llvm-commits mailing list