Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 1.05 KB | None | 0 0
  1. scala> import scala.collection.immutable.{Seq=>ISeq}
  2. import scala.collection.immutable.{Seq=>ISeq}
  3.  
  4. scala> val seq = Seq(1,2)
  5. seq: Seq[Int] = List(1, 2)
  6.  
  7. scala> val iseq = ISeq(1,2)
  8. iseq: scala.collection.immutable.Seq[Int] = List(1, 2)
  9.  
  10. scala> :type -v seq
  11. // Type signature
  12. Seq[Int]
  13.  
  14. // Internal Type structure
  15. TypeRef(
  16.   TypeSymbol(
  17.     abstract trait Seq[+A] extends PartialFunction[Int,A] with Iterable[A] with GenSeq[A] with GenericTraversableTemplate[A,Seq] with SeqLike[A,Seq[A]]
  18.  
  19.   )
  20.   args = List(
  21.     TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
  22.   )
  23. )
  24.  
  25. scala> :type -v iseq
  26. // Type signature
  27. scala.collection.immutable.Seq[Int]
  28.  
  29. // Internal Type structure
  30. TypeRef(
  31.   TypeSymbol(
  32.     abstract trait Seq[+A] extends Iterable[A] with Seq[A] with GenericTraversableTemplate[A,scala.collection.immutable.Seq] with SeqLike[A,scala.collection.immutable.Seq[A]] with Parallelizable[A,scala.collection.parallel.immutable.ParSeq[A]]
  33.  
  34.   )
  35.   args = List(
  36.     TypeRef(TypeSymbol(final abstract class Int extends AnyVal))
  37.   )
  38. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement