Given the list
[Apple, Banana, Carrot], remove the first element to produce the list
[Banana, Carrot]
clojure (let [fruit ["Apple" "Banana" "Carrot"]
index 0]
(concat
(take index fruit)
(drop (+ index 1) fruit)))
(let [fruit ["Apple" "Banana" "Carrot"]
index 0]
(concat
(take index fruit)
(drop (+ index 1) fruit)))
Submit a new solution for
clojure
There are 29 other solutions in
additional languages (
cpp,
csharp,
erlang,
fantom ...)