Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
evaluate :: Settings -> String -> [(String, Double)] -> Double Source #
Evaluate an expression Example: `evaluate def "x + y ^ 2" [("x", 1), ("y", 2)]
Operators are in the form (character, precedence, function)
Example: (+
, 0, (+)), ('', 1, ())
(higher the precedence, the sooner the operator operates)
Functions are in the form (name, function) Example: ("ln", log)