View Problem

Define a static list

Define the list [One, Two, Three, Four, Five]
DiskEdit
python
list = ['One', 'Two', 'Three', 'Four', 'Five']
print list
ExpandDiskEdit
fsharp
let list = ["One"; "Two"; "Three"; "Four"; "Five"]
ExpandDiskEdit
fsharp
let list = (new Generic.LinkedList<string>([|"One"; "Two"; "Three"; "Four"; "Five"|]))
ExpandDiskEdit
fsharp
let list = (new Generic.LinkedList<string>())

list.AddFirst("One") ; list.AddLast("Five") ; list.AddBefore(list.Find("Five"), "Four")
list.AddAfter(list.Find("One"), "Two") ; list.AddAfter(list.Find("Two"), "Three")
ExpandDiskEdit
fsharp
let list = (new Generic.List<string>())

[|"One"; "Two"; "Three"; "Four"; "Five"|] |> Array.iter (fun x -> list.Add(x))
ExpandDiskEdit
fantom
list := ["One", "Two", "Three", "Four", "Five"]

Submit a new solution for python, fsharp, or fantom
There are 30 other solutions in additional languages (clojure, cpp, csharp, erlang ...)