Skip to content

Instantly share code, notes, and snippets.

@tanishiking
Last active December 24, 2015 18:27
Show Gist options
  • Save tanishiking/6f00fee027b68a142879 to your computer and use it in GitHub Desktop.
Save tanishiking/6f00fee027b68a142879 to your computer and use it in GitHub Desktop.
scala> 1 :: 2 :: 3 :: Nil
res22: List[Int] = List(1, 2, 3)
scala Stream.cons(1, Stream.cons(2, Stream.cons (3, Stream.empty)))
res23: Stream.Cons[Int] = Stream(1, ?)
scala> 1 #:: 2 #:: 3 #:: Stream.empty
res24: scala.collection.immutable.Stream[Int] = Stream(1, ?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment