Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.collection/scala.collection.immutable/Stream/cons

cons

scala.collection.immutable.Stream.cons
objectcons

An alternative way of building and matching Streams using Stream.cons(hd, tl).

Attributes

Source
Stream.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
cons.type

Members list

Value members

Concrete methods

defapply[A](hd:A,tl:=>Stream[A]):Stream[A]

A stream consisting of a given first element and remaining elements

A stream consisting of a given first element and remaining elements

Value parameters

hd

The first element of the result stream

tl

The remaining elements of the result stream

Attributes

Source
Stream.scala
defunapply[A](xs:Stream[A]):Option[(A,Stream[A])]

Maps a stream to its head and tail

Maps a stream to its head and tail

Attributes

Source
Stream.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp