Assign the variable
"list" to a list with no elements
scala val list = Nil
object SolutionXX extends Application {
val list = Nil
}
scala val list = List()
object SolutionXX extends Application {
val list = List()
}
scala val list : List[String] = List()
object SolutionXX extends Application {
val list : List[String] = List()
}
csharp 3var list = new List<object>();
using System.Collections.Generic;
class SolutionXX
{
static void Main()
{
var list = new List<object>();
}
}
fantom list := [,]
class SolutionXX
{
Void main()
{
list := [,]
}
}
Submit a new solution for
scala,
csharp, or
fantom
There are 21 other solutions in
additional languages (
clojure,
cpp,
erlang,
fsharp ...)