It should probably be done with using `into: joiner(",")`, where the joiner
implements the collectable protocol. join itself probably doesn't make much
sense because it doesn't play well with other options such as :into itself,
or :reduce.

On Tue, Jun 21, 2022 at 6:15 PM Christian Blavier <cblav...@gmail.com>
wrote:

> Do you think a join option would be a good idea for comprehensions?
> Something like Enum.map_join/2 that could map and join lists in a single
> pass.
> book_ids = for book <- books, join: ",", do: book.id
>
> If it looks like a good idea, I will open a PR.
>
> Best,
>
> Christian
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/f8b94dec-35a1-4b78-a14c-6913c7206fe3n%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/f8b94dec-35a1-4b78-a14c-6913c7206fe3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LGpRuEHuK782TcBoMZvM7p%2Bw0-4nywFWEAT8ZU2%3DjpHA%40mail.gmail.com.

Reply via email to