What's the meaning of #:: in Scala? -
what meaning of x#::xs in scala?
for illustration
case x #:: xs => { in case x stream suppose same syntax valid list ecc...
it's extractor pattern matching streams. not valid lists. lists have :: (note there no # in list).
the meaning of case x #:: xs => when pattern matched, x contain head of stream, , xs contain rest of stream (tail).
check stream documentation examples on how define streams.
scala
No comments:
Post a Comment