View Problem

Define a static list

Define the list [One, Two, Three, Four, Five]
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))

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