Re: [elixir-core:10735] [Proposal] Conditional pipe

2022-02-02 Thread Sven Gehring
Hi, Suppose the Repo query example is wrapped in a function that should return {:ok, [%User{}]} | {:error, :any}, how would one specify what is returned in the "else" case of a "pipe_if"? Is nothing returned? I am not sure if I am missing something but all the use-cases I can think of can be

[elixir-core:10735] [Proposal] Conditional pipe

2022-02-02 Thread xward
Hi ! A few months ago we added a conditional pipe in our code in our 120k+ line of elixir code and it turns out to be very useful. The proposition is to contribute and add it to Elixir kernel, also to find out if we can do it better thanks to your feedback here. - Usecases - avoid breaking