narrowtux / abacus

Parses and evaluates mathematical expressions in Elixir. Inspired by math.js
MIT License
85 stars 18 forks source link

Support elixir functions #16

Closed h4cc closed 4 years ago

h4cc commented 5 years ago

Offer registering own functions by name in runtime, so they can be called in a abacus expression.

narrowtux commented 4 years ago

references to functions can be passed in the scope:

Abacus.eval("print(31)", %{print: &IO.puts/1})