Implementing expressions in scala version