C# to Scala Converter