Skip to content

Commit

Permalink
Merge pull request lampepfl#13 from ebolinger/patch-1
Browse files Browse the repository at this point in the history
Update CheatSheet.md
  • Loading branch information
lrytz committed Nov 22, 2012
2 parents abf748e + bd30081 commit 85a0d85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CheatSheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 85a0d85

Please sign in to comment.