The :::
operator is already used for List
concatenations, like in List(1,2,3) ::: List(4,5,6)
gives List(1,2,3,4,5,6)
.
Also, we had to make a choice on which operators become right-associative. We chose that everything that ends in a ":" would be so, which means that a ::: b ::: c
is translated to method calls c.:::(b).:::(a)
. Since streams are usually infinite, it would not make much sense to use right-associative operations in this way, so one would need to use another character as the last character, for example ::+