The exclamation mark ! returns the result, which would otherwise be returned in the {:ok, result} tuple.
This made me wonder if there is a method of piping only selected parameters to the next function in the pipe.
If I have:
{:ok, some_value} |> OI.puts #Is there any way of printing the value of some_value?
There are some hex-packages available that claim to be able to deal with piping :ok tuples, but personally I tend to do one of the following (in order of preference):
Use with rather than piping
write a function that extracts the value and also deals with error