Given the list
[One, Two, Three, Four, Five], fetch the third element (
'Three')
fsharp let result = List.nth ["One"; "Two"; "Three"; "Four"; "Five"] 2
#light
open System
let result = List.nth ["One"; "Two"; "Three"; "Four"; "Five"] 2
printfn "%s" result
clojure (nth '[One Two Three Four Five] 2)
(nth '[One Two Three Four Five] 2)
Submit a new solution for
fsharp or
clojure
There are 23 other solutions in
additional languages (
cpp,
csharp,
erlang,
fantom ...)