Scala Algebra System