t

Stream._extend._zip

trait _zip[A] extends AnyRef

Merge Interface

Self Type
Stream[A]
Ordering
  1. Alphabetic
Inherited
  1. Stream._extend._zip
  2. scala.AnyRef
  3. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  2. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  3. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  4. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  6. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def notify(): Unit
    Definition Classes
    AnyRef
  10. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  11. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  12. def toString(): String
    Definition Classes
    AnyRef → Any
  13. def unzip[B, C](implicit f: (A) ⇒ (B, C)): (Stream[B], Stream[C])

    Unzips stream in two

    Unzips stream in two

    val pairs = ('a' <> 'g').all.zipMap(_.upper).to[Idx]
    
    pairs.all.lp  // Prints ~((a,A), (b,B), (c,C), (d,D), (e,E), (f,F), (g,G))
    
    val (left, right) = pairs.all.unzip
    
    left.all.lp   // Prints ~(a, b, c, d, e, f, g)
    
    right.all.lp  // Prints ~(G, F, E, D, C, B, A)
    Definition Classes
    _zip
  14. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def zip[B](that: ~[B]): ~[(A, B)]

    Zip that

    Zip that

    Merges this and that streams, creating Tuples for corresponding elements

    If that stream runs out of elements to merge, the rest of this stream will be discarded too

    (1 <> 100).all.zip('A' <> 'D').lp
    
    // Output
    ~((1,A), (2,B), (3,C), (4,D))
    Definition Classes
    _zip
  18. def zipAll[B](that: ~[B], thisDflt: Opt[A], thatDflt: Opt[B]): ~[(A, B)]

    Merge stream

    Merge stream

    Merges this and that streams, creating Tuples for corresponding elements

    that

    the stream to merge with this

    thisDflt

    if this Stream has fewer elements, thisDflt will be used to fill the voids. Fails if thisDflt is required, but not available

    thatDflt

    if that Stream has fewer elements, thatDflt will be used to fill the voids. Fails if thatDflt is required, but not available

    Definition Classes
    _zip
    Example:
    1. ('a' <> 'f').all.zip('A' <> 'H', '?', '?').lp
      
      // Output
      ~((a,A), (b,B), (c,C), (d,D), (e,E), (f,F), (?,G), (?,H))
  19. def zipFoldAs[B](start: B)(f: Folding.As[B, A]): Stream[(A, B)]

    Merges current folding value

    Merges current folding value

    (1 <> 7).all.zipFoldAs(0L)(_ + _).tp
    
    // "Running Total" Output
    -- --
    ?  ?
    -- --
    1  1
    2  3
    3  6
    4  10
    5  15
    6  21
    7  28
    Definition Classes
    _zip
  20. def zipIdx(start: Int): ~[(Int, A)]

    Merge index

    Merge index

    Creates a new Stream with elements paired with their sequential index

    Note: Idx is the first element in the resulting tuples.

    start

    index initial value

    Definition Classes
    _zip
    Example:
    1.  ('A' <> 'F').all.zipIdx('A'.toInt) lp
      
      // Output
      ~((65,A), (66,B), (67,C), (68,D), (69,E), (70,F))
  21. def zipIdx: ~[(Int, A)]

    Merge index

    Merge index

    Creates a new Stream with elements paired with their sequential index, starting at 0

    Note: Idx is the first element in the resulting tuples

    ('A' <> 'F').all.zipIdx.lp
    
    // Output
    ~((0,A), (1,B), (2,C), (3,D), (4,E), (5,F))
    Definition Classes
    _zip
  22. def zipMap[B](f: Mapping[A, B]): ~[(A, B)]

    Merge property

    Merge property

    Creates a new Stream with elements paired with their property, defined by given function

    ('A' <> 'F').all.zipMap(_.toInt).lp
    
    // Output
    ~((A,65), (B,66), (C,67), (D,68), (E,69), (F,70))
    Definition Classes
    _zip
  23. def zipNext: ~[(A, Opt[A])]

    Merge with next

    Merge with next

    Creates new Stream with elements paired with the optional next element

    (1 <> 5).all.zipNext.lp
    
    // Output
    ~((1,Opt(2)), (2,Opt(3)), (3,Opt(4)), (4,Opt(5)), (5,Void))
    Definition Classes
    _zip
  24. def zipPrior: ~[(Opt[A], A)]

    Merge with prior

    Merge with prior

    Creates new Stream with elements paired with the optional prior element

    (1 <> 5).all.zipPrior.lp
    
    // Output
    ~((Void,1), (Opt(1),2), (Opt(2),3), (Opt(3),4), (Opt(4),5))
    Definition Classes
    _zip

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
Linear Supertypes
AnyRef, Any
Source: _zip.scala