diff options
Diffstat (limited to 'lib/calc.ex')
| -rw-r--r-- | lib/calc.ex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/calc.ex b/lib/calc.ex new file mode 100644 index 0000000..0e53c06 --- /dev/null +++ b/lib/calc.ex @@ -0,0 +1,6 @@ +defmodule Thulani.Calc do + use Rustler, otp_app: :thulani, crate: "thulani_calc" + + @spec eval(String.t()) :: {:ok, number | :inf | :ninf | :nan} | {:error, String.t()} + def eval(_expr), do: :erlang.nif_error(:nif_not_loaded) +end |
