diff --git a/elixir/rpn-calculator/lib/rpn_calculator.ex b/elixir/rpn-calculator/lib/rpn_calculator.ex index bfbb10d..f6bc251 100644 --- a/elixir/rpn-calculator/lib/rpn_calculator.ex +++ b/elixir/rpn-calculator/lib/rpn_calculator.ex @@ -4,18 +4,14 @@ defmodule RPNCalculator do end def calculate(stack, operation) do - try do - {:ok, operation.(stack)} - rescue - _e -> :error - end + {:ok, operation.(stack)} + rescue + _e -> :error end def calculate_verbose(stack, operation) do - try do - {:ok, operation.(stack)} - rescue - e -> {:error, e.message} - end + {:ok, operation.(stack)} + rescue + e -> {:error, e.message} end end