Often I have a function that I want to apply to a pipeline conditionally. 
I'm forced not to either write a "maybe_do_x" function or use an inline 
check with then/2.

Now that we have then/2, I'm thinking it might be nice to have then/3 so 
that we don't need "maybe_" functions anymore, improving composability. 
Example usage:

y_needed = # true or false

some_value
|> do_something()
|> then(y_needed, &write_y(&1, arg0, arg1) )

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/9b4501b4-e114-4421-b61a-74240d160a15n%40googlegroups.com.

Reply via email to