Sandbox for algebraic structures in Scala