It might be a trivial question, but I am unable to find the documentation for it:
Inside Stream, and at other places I have seen examples using the method #::. For example:
val fibs: Stream[BigInt] = BigInt(0) #:: BigInt(1) #:: fibs.zip(fibs.tail).map { n => n._1 + n._2 }
But I dont find the documentation for implicit method #:: in the api. What is it? and where is it declared?
First value member of in the Stream.ConsWrapper. I found by using the symbol index on the left pane under the search box.
Here is its signature:
def #::(hd: A): Stream[A]
In few words is the List :: but for streams.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With