diff --git a/CheatSheet.md b/CheatSheet.md index 2923c567..6ebee113 100644 --- a/CheatSheet.md +++ b/CheatSheet.md @@ -360,7 +360,7 @@ Scala defines several collection classes: // Operations on Streams val xs = Stream(1, 2, 3) - val xs = Stream.cons(1, Stream.cons(2, Stream.empty)) // same as above + val xs = Stream.cons(1, Stream.cons(2, Stream.cons(3, Stream.empty))) // same as above (1 to 1000).toStream // => Stream(1, ?) x #:: xs // Same as Stream.cons(x, xs) // In the Stream's cons operator, the second parameter (the tail)