code challenges in scala