View Problem

Remove an element from a list by index

Given the list [Apple, Banana, Carrot], remove the first element to produce the list [Banana, Carrot]
ExpandDiskEdit
scala
val (fl, fr) = fruit.splitAt(0) ; fruit = fl ::: fr.tail
ExpandDiskEdit
scala
fruit = fruit.tail
ExpandDiskEdit
scala
fruit = fruit.drop(1)
ExpandDiskEdit
scala
fruits = fruits.remove(fruits.indexOf(_) == 0)

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