.take does not make much sense on an unordered collection. Maybe change it to coffees.sortBy(_.name).take(3).filter(_.price > 9.0).map(_.name)?