Skip to content

Commit

Permalink
Scala (2.13) now has lazy lists
Browse files Browse the repository at this point in the history
  • Loading branch information
AlterEgo7 authored and hmemcpy committed Aug 29, 2019
1 parent 2e472f0 commit 3d29cd9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/content/1.7/code/scala/snippet25.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
// just imagine for a moment
// that Scala has lazy lists
def nats: Stream[Int] = Stream.from(1)
def nats: LazyList[Int] = LazyList.from(1)

0 comments on commit 3d29cd9

Please sign in to comment.