Quick actions

cmd+k|ctrl+k

Navigation

Languages

Colección inmutable - Queue

Snippet info

Language

Scala

Visibility

public

Author

zoek

Created

2016-08-31T20:47:04Z

Updated

2016-08-31T20:47:04Z

object Main extends App {
    val empty = scala.collection.immutable.Queue[Int]()
    println(empty)
    val has1 = empty.enqueue(1)
    
    println(has1)

    val has123 = has1.enqueue(List(2, 3))

    val (element, has23) = has123.dequeue
    
    println(has23)
    println(has123)
}
INFO