Looking at this question, where the questioner is interested in the first and last instances of some element in a List, it seems a more efficient solution would be
As a supplemental to the answer of @KimStebel I like to add:
If you are searching for a data structure suitable for the question that motivated you to ask this question, then you might have a look at Extreme Cleverness: Functional Data Structures in Scala by @DanielSpiewak.