fsprojects/FSharpx.Collections


LazyList

Namespace: FSharpx.Collections

Functions and values

Function or valueDescription
append arg1 source
Signature: LazyList<'T> -> source:LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(1). Return the list which contains on demand the elements of the first list followed by the elements of the second list

concat arg1
Signature: LazyList<LazyList<'T>> -> LazyList<'T>
Type parameters: 'T

O(1). Return the list which contains on demand the list of elements of the list of lazy lists.

cons arg1 arg2
Signature: 'T -> LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(1). Return a new list which contains the given item followed by the given list.

consDelayed arg1 arg2
Signature: 'T -> (unit -> LazyList<'T>) -> LazyList<'T>
Type parameters: 'T

O(1). Return a new list which on consumption contains the given item followed by the list returned by the given computation. The

delayed arg1
Signature: (unit -> LazyList<'T>) -> LazyList<'T>
Type parameters: 'T

O(1). Return a list that is in effect the list returned by the given computation. The given computation is not executed until the first element on the list is consumed.

drop count source
Signature: count:int -> source:LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(n), where n is count. Return the list which on consumption will remove of at most 'n' elements of the input list.

empty
Signature: LazyList<'T>
Type parameters: 'T

O(1). Evaluates to the list that contains no items

filter predicate source
Signature: predicate:('T -> bool) -> source:LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(1). Return a new collection which on consumption will consist of only the elements of the collection for which the given predicate returns "true"

find predicate source
Signature: predicate:('T -> bool) -> source:LazyList<'T> -> 'T
Type parameters: 'T

O(n), worst case. Return the first element for which the given function returns true. Raise KeyNotFoundException if no such element exists.

fold f s l
Signature: f:('T1 -> 'T2 -> 'T1) -> s:'T1 -> l:LazyList<'T2> -> 'T1
Type parameters: 'T1, 'T2

O(n). /// it applies a function to each element of a list, passing an accumulating parameter from left to right,

head arg1
Signature: LazyList<'T> -> 'T
Type parameters: 'T

O(1). Return the first element of the list. Forces the evaluation of the first cell of the list if it is not already evaluated.

isEmpty arg1
Signature: LazyList<'T> -> bool
Type parameters: 'T

O(1). Test if a list is empty. Forces the evaluation of the first element of the stream if it is not already evaluated.

iter action list
Signature: action:('T -> unit) -> list:LazyList<'T> -> unit
Type parameters: 'T

O(n). Apply the given function to each element of the collection.

length list
Signature: list:LazyList<'T> -> int
Type parameters: 'T

O(n). Return the length of the list

map mapping source
Signature: mapping:('T -> 'U) -> source:LazyList<'T> -> LazyList<'U>
Type parameters: 'T, 'U

O(1). Build a new collection whose elements are the results of applying the given function to each of the elements of the collection.

map2 mapping arg2 arg3
Signature: mapping:('T1 -> 'T2 -> 'U) -> LazyList<'T1> -> LazyList<'T2> -> LazyList<'U>
Type parameters: 'T1, 'T2, 'U

O(1). Build a new collection whose elements are the results of applying the given function to the corresponding elements of the two collections pairwise.

mapAccum f s l
Signature: f:('T1 -> 'T2 -> 'T1 * 'T3) -> s:'T1 -> l:LazyList<'T2> -> 'T1 * LazyList<'T3>
Type parameters: 'T1, 'T2, 'T3

O(n). Behaves like a combination of map and fold; it applies a function to each element of a list, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new list.

ofArray arg1
Signature: 'T array -> LazyList<'T>
Type parameters: 'T

O(1). Build a collection from the given array. This function will eagerly evaluate all of the list (and thus may not terminate).

ofList arg1
Signature: 'T list -> LazyList<'T>
Type parameters: 'T

O(1). Build a collection from the given list. This function will eagerly evaluate all of the list (and thus may not terminate).

ofSeq arg1
Signature: seq<'T> -> LazyList<'T>
Type parameters: 'T

O(1). Build a new collection from the given enumerable object

repeat arg1
Signature: 'T -> LazyList<'T>
Type parameters: 'T

O(1). Return the list which on consumption will consist of an infinite sequence of the given item

rev arg1
Signature: LazyList<'T> -> LazyList<'T>
Type parameters: 'T

Returns the reverse list.

scan folder arg2 source
Signature: folder:('State -> 'T -> 'State) -> 'State -> source:LazyList<'T> -> LazyList<'State>
Type parameters: 'State, 'T

O(1). Return a new list consisting of the results of applying the given accumulating function to successive elements of the list

skip count source
Signature: count:int -> source:LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(n), where n is count. Return the list which on consumption will skip the first 'n' elements of the input list.

split arg1 arg2
Signature: LazyList<'T> -> int -> 'T list * LazyList<'T>
Type parameters: 'T

Splits the list at the gicen index.

tail arg1
Signature: LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(1). Return the list corresponding to the remaining items in the sequence.
Forces the evaluation of the first cell of the list if it is not already evaluated.

take count source
Signature: count:int -> source:LazyList<'T> -> LazyList<'T>
Type parameters: 'T

O(n), where n is count. Return the list which on consumption will consist of at most 'n' elements of the input list.

toArray arg1
Signature: LazyList<'T> -> 'T array
Type parameters: 'T

O(n). Build an array from the given collection

toList arg1
Signature: LazyList<'T> -> 'T list
Type parameters: 'T

O(n). Build a non-lazy list from the given collection. This function will eagerly evaluate all of the list (and thus may not terminate).

toSeq arg1
Signature: LazyList<'T> -> seq<'T>
Type parameters: 'T

O(n). Return a view of the collection as an enumerable object

tryFind predicate source
Signature: predicate:('T -> bool) -> source:LazyList<'T> -> 'T option
Type parameters: 'T

O(n), worst case. Apply the given function to successive elements of the list, returning the first result where function returns Some(x) for some x. If the function never returns true, 'None' is returned.

tryHead arg1
Signature: LazyList<'T> -> 'T option
Type parameters: 'T

O(1). Return option the first element of the list. Forces the evaluation of the first cell of the list if it is not already evaluated.

trySkip count source
Signature: count:int -> source:LazyList<'T> -> LazyList<'T> option
Type parameters: 'T

O(n), where n is count. Return option the list which skips the first 'n' elements of the input list.

tryTail arg1
Signature: LazyList<'T> -> LazyList<'T> option
Type parameters: 'T

O(1). Return option the list corresponding to the remaining items in the sequence.
Forces the evaluation of the first cell of the list if it is not already evaluated.

tryTake count source
Signature: count:int -> source:LazyList<'T> -> LazyList<'T> option
Type parameters: 'T

O(n), where n is count. Return the list which on consumption will consist of at most 'n' elements of the input list.

tryUncons arg1
Signature: LazyList<'T> -> ('T * LazyList<'T>) option
Type parameters: 'T

O(1). Returns option tuple of head element and tail of the list.

uncons arg1
Signature: LazyList<'T> -> 'T * LazyList<'T>
Type parameters: 'T

O(1). Returns tuple of head element and tail of the list.

unfold arg1 arg2
Signature: ('State -> ('T * 'State) option) -> 'State -> LazyList<'T>
Type parameters: 'State, 'T

O(1). Return a list that contains the elements returned by the given computation. The given computation is not executed until the first element on the list is consumed. The given argument is passed to the computation. Subsequent elements in the list are generated by again applying the residual 'b to the computation.

zip arg1 arg2
Signature: LazyList<'T1> -> LazyList<'T2> -> LazyList<'T1 * 'T2>
Type parameters: 'T1, 'T2

O(1). Return the list which contains on demand the pair of elements of the first and second list

Active patterns

Active patternDescription
( |Cons|Nil| ) arg1
Signature: LazyList<'T> -> Choice<('T * LazyList<'T>),unit>
Type parameters: 'T

CompiledName: |Cons|Nil|

Fork me on GitHub