Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update CheatSheet.md

Fixed typo on Stream example
  • Loading branch information...
commit bd30081874d58182d6d23365104b9d8371a2e947 1 parent abf748e
@ebolinger ebolinger authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  CheatSheet.md
View
2  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)
Please sign in to comment.
Something went wrong with that request. Please try again.