A Scala implementation of a calculator to illustrate Functional Programming concepts like ADTs, Implicits and Typeclasses
Add the following to your build.sbt
resolvers += Resolver.bintrayRepo("ajatix", "scala")
libraryDependencies += "io.github.ajatix" %% "calculate" % "0.3"
In your main application, your can run the following
import io.github.ajatix.calculate.ExpressionDSL._
object Calculate extends App {
val e = 3 into 4 plus 3 by 3 minus 4
println(e)
println(e.reorder())
println(e.reorder().optimize())
println(e.reorder().optimize().evaluate())
}