tap and then
tap/2
tap(value, fn x) -> value
Applies the value into the function and returns the original value. I rarely use this, but can be helpful when printf debugging.
tap(, fn name -> end)
# Gandalf
then/2
then(value, fn x) -> fn result
Applies the value into the function and return the result of the function. Mostly used inside of pipelines.
|> String.trim()
|> then(fn name -> end)
# Hello, Gandalf