Quick Collections

Scalqa introduces a basic collections framework with following main entities:

Collection

trait Any.Collection[+T] {

 def size: Int

 def all : ~[T]

}

Indexed Collection

trait Idx[+T] extends Any.Collection[T]{

 def apply(i: Int): T

}

Lookup Collection

trait Lookup[K,+T] extends Any.Collection[T] {

 def getOpt(k: K): Opt[T]

 def allPairs    : ~[(K,T)]

}

Method all returns Stream.Interface, which is essentially a Stream of all elements

Stream is the ONLY class responsible for functional processing of all collections, therefore its performance is paramount

Collection interfaces also have mutable and immutable extensions