[Home] Module Microsoft.FSharp.Compatibility.FSharp.LazyList


Type Definitions

TypeDescription
type llist Note: an abbreviation for 'a LazyList
type t Note: an abbreviation for 'a LazyList

Values

ValueDescription
val ( |Cons|Nil| ) : 'a llist -> Choice<('a * 'a llist),unit>
val append : 'a LazyList -> 'a LazyList -> 'a LazyList
Return the stream which contains on demand the elements of the first stream followed by the elements of the second list
val combine : 'a LazyList -> 'b LazyList -> ('a * 'b) LazyList
Return the stream which contains on demand the pair of elements of the first and second list
val concat : 'a LazyList LazyList -> 'a LazyList
Return the stream which contains on demand the list of elements of the list of lazy lists.
val cons : 'a -> 'a LazyList -> 'a LazyList
Return a new stream which contains on demand the given item followed by the given stream.
val consf : 'a -> (unit -> 'a LazyList) -> 'a LazyList
Return a new stream which contains on demand the given item followed by the stream returned by the given computation. The computation is not executed until the elements of the stream are consumed. The computation is only executed once.
val delayed : (unit -> 'a LazyList) -> 'a LazyList
Return a stream that is in effect the stream returned by the given computation. The given computation is not executed until the first element on the stream is consumed.
val drop : int -> 'a LazyList -> 'a LazyList
Return the stream without the first 'n' elements of the given stream. Does not force the evaluation of any cells in the stream.
val empty : unit -> 'a LazyList
Evaluates to the stream that contains no items
val filter : ('a -> bool) -> 'a LazyList -> 'a LazyList
Return a new collection which on consumption will consist of only the elements of the collection for which the given predicate returns "true"
val find : ('a -> bool) -> 'a LazyList -> 'a
Return the first element for which the given function returns "true". Raise 'Not_found' if no such element exists.
val first : ('a -> bool) -> 'a LazyList -> 'a option
Apply the given function to successive elements of the list, returning the first result where function returns 'Some(x)' for some x. If the funtion never returns true, 'None' is returned.
val folds : ('b -> 'a -> 'b) -> 'b -> 'a LazyList -> 'b LazyList
Return a new stream consisting of the results of applying the given accumulating function to successive elements of the stream
val get : 'a LazyList -> ('a * 'a LazyList) option
Get the first cell of the stream.
val hd : 'a LazyList -> 'a
Return the first element of the stream. Raise 'Invalid_argument "hd"' if the stream is empty. Forces the evaluation of the first cell of the stream if it is not already evaluated.
val map : ('a -> 'b) -> 'a LazyList -> 'b LazyList
Build a new collection whose elements are the results of applying the given function to each of the elements of the collection.
val map2 : ('a -> 'b -> 'c) -> 'a LazyList -> 'b LazyList -> 'c LazyList
Build a new collection whose elements are the results of applying the given function to the corresponding elements of the two collections pairwise.
val nonempty : 'a LazyList -> bool
Test if a stream contains at least one element. Forces the evaluation of the first element of the stream if it is not already evaluated.
val of_array : 'a array -> 'a LazyList
Build a collection from the given array. This function will eagerly evaluate all of the stream (and thus may not terminate).
val of_list : 'a list -> 'a LazyList
Build a collection from the given list. This function will eagerly evaluate all of the stream (and thus may not terminate).
val of_seq : #seq<'a> -> 'a LazyList
Build a new collection from the given enumerable object
val repeat : 'a -> 'a LazyList
Return the stream which on consumption will consist of an infinite sequence of the given item
val take : int -> 'a LazyList -> 'a LazyList
Return the stream which on consumption will consist of at most 'n' elements of the given stream. Does not force the evaluation of any cells in the stream.
val tl : 'a LazyList -> 'a LazyList
Return the stream corresponding to the remaining items in the sequence. Raise 'Invalid_argument "tl"' if the stream is empty. Forces the evaluation of the first cell of the stream if it is not already evaluated.
val to_array : 'a LazyList -> 'a array
Build an array from the given collection
val to_ICollection : 'a LazyList -> ICollection<'a>
Return a view of the collection as a .NET collection
val to_list : 'a LazyList -> 'a list
Build a list from the given collection This function will eagerly evaluate all of the stream (and thus may not terminate).
val to_seq : 'a LazyList -> seq<'a>
Return a view of the collection as an enumerable object
val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a LazyList
Return a stream that contains the elements returned by the given computation. The given computation is not executed until the first element on the stream is consumed. The given argument is passed to the computation. Subsequent elements in the stream are generated by again applying the residual 'b to the computation.

Deprecated Values

ValueDescription
[<Obsolete ("Consider using of_IEnumerable instead")>]
val of_ICollection : #ICollection<'a> -> 'a LazyList

Note: Consider using of_IEnumerable instead

Build a new collection from any type that supports the .NET ICollection interface
[<Obsolete ("Consider using of_seq instead")>]
val of_IEnumerable : #IEnumerable<'a> -> 'a LazyList

Note: Consider using of_seq instead

Build a new collection from the given enumerable object
[<Obsolete ("Consider using to_seq instead")>]
val to_IEnumerable : 'a LazyList -> IEnumerable<'a>

Note: Consider using to_seq instead

Return a view of the collection as an enumerable object

See Also

Microsoft.FSharp.Compatibility.FSharp


Documentation for assembly FSharp.Compatibility, version 1.9.4.19, generated using F# version 1.9.4.19