SeqUtils

object SeqUtils
class Object
trait Matchable
class Any

Value members

Concrete methods

def filterOptions[A, B](ls: List[(A, Option[B])]): List[(A, B)]

filterOptions((1,Some('a')),(2,None),(3,Some('c'))) = List((1,'a'),(3,'c'))

filterOptions((1,Some('a')),(2,None),(3,Some('c'))) = List((1,'a'),(3,'c'))

def intersperse[A](a: A, xs: List[A]): List[A]

Similar to Haskel's intersperse intersperse(",",List("A","B","C") = "A,B,C"

Similar to Haskel's intersperse intersperse(",",List("A","B","C") = "A,B,C"

def transpose[A, B](ls: List[(A, Set[B])]): List[List[(A, B)]]

transpose(List(("A",List(1,2)), ("B",List(2,3)),("C",List(4)))) = List(List(("A",1),("B",2),("C",4)), List(("A",1),("B",3),("C",4)), List(("A",2),("B",2),("C",4)), List(("A",2),("B",3),("C",4))) TODO: Generalize this function using a Monoid to return a Stream...

transpose(List(("A",List(1,2)), ("B",List(2,3)),("C",List(4)))) = List(List(("A",1),("B",2),("C",4)), List(("A",1),("B",3),("C",4)), List(("A",2),("B",2),("C",4)), List(("A",2),("B",3),("C",4))) TODO: Generalize this function using a Monoid to return a Stream...

def zipN[A](s: List[List[A]]): List[List[A]]