File.open()やTimex.parse()のような、タプルで結果を返す処理をパイプで処理するために、関数パターンマッチで:okや:errorを捉える関数を持つモジュールを用意すると、パイプの途中で止めなくて済む
defmodule Tpl do
def ok( { :ok, result } ), do: result
def error( { :error, result } ), do: result
def both( { :ok, result } ), do: result
def both( { :error, result } ), do: result
end
both()を使うと、:okと:errorの両方を次に流す