Collections

play.api.libs.Collections
object Collections

Utilities functions for Collections

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Deprecated methods

def unfoldLeft[A, B](seed: B)(f: B => Option[(B, A)]): Seq[A]

Produces a Seq from a seed and a function.

Produces a Seq from a seed and a function.

Example, produces a List from 100 to 0.

unfoldLeft(0) {
 case a if a > 100 => None
 case a => Some((a + 1, a))
}

Type parameters

A

Type of the final List elements.

B

Seed type

Value parameters

f

Function producing the List elements.

seed

Initial value.

Attributes

Deprecated
[Since version 2.9.0] use Seq.unfold