Get an empty ICList of type A
Get an empty ICList of type A
empty of the empty list.
an empty ICList.
Implicitly convert to a list.
Implicitly convert to a list. This allows for the example where we can construct an ICList and store in a List.
import java.io.InputStream def getInputStream(i: Int) = new java.io.ByteArrayInputStream(i.toString.getBytes) implicit val stringToInt = (_:String).toInt implicit val isToInt = (is: InputStream) => stringToInt(io.Source.fromInputStream(is).getLines.mkString("\n")) // Construct a list of Int from things we can convert to Ints from translation functions that are in scope. // NOTICE: Because of implicitConversionListToList, we get implicit conversion to lists. val lst: List[Int] = (1 :: getInputStream(2) :: "3" :: ICList.empty[Int]) require(lst.isInstanceOf[List[Int]] && (1 to 3) == lst, "lst should be List(1,2,3)")
the type of the list
an ICList to convert
a List of type A.