Function or value | Description |
|
O(1). Return the list which contains on demand the elements of the first list followed by the elements of the second list
|
|
O(n). Compares two lazy lists using the given comparison function, element by element. Both lists are evaluated until one of them is empty.
|
|
|
|
|
|
O(1). Return a new list which on consumption contains the given item followed by the list returned by the given computation. The
|
|
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.
|
|
O(n), where n is count. Return the list which on consumption will remove of at most 'n' elements of the input list.
|
|
|
|
O(n). Checks if two lazy lists are equal using the given equality function, element by element. Both lists are evaluated until one of them is empty.
|
|
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"
|
Full Usage:
LazyList.find predicate source
Parameters:
'T -> bool
source : LazyList<'T>
Returns: 'T
|
O(n), worst case. Return the first element for which the given function returns
|
Full Usage:
LazyList.fold f s l
Parameters:
'T1 -> 'T2 -> 'T1
s : 'T1
l : LazyList<'T2>
Returns: 'T1
|
O(n). /// it applies a function to each element of a list, passing an accumulating parameter from left to right,
|
|
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.
|
|
O(1). Test if a list is empty. Forces the evaluation of the first element of the stream if it is not already evaluated.
|
|
|
|
|
|
O(1). Build a new collection whose elements are the results of applying the given function to each of the elements of the collection.
|
|
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.
|
|
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.
|
|
O(1). Build a collection from the given array. This function will eagerly evaluate all of the list (and thus may not terminate).
|
|
O(1). Build a collection from the given list. This function will eagerly evaluate all of the list (and thus may not terminate).
|
|
|
|
|
|
|
|
O(1). Return a new list consisting of the results of applying the given accumulating function to successive elements of the list
|
|
O(n), where n is count. Return the list which on consumption will skip the first 'n' elements of the input list.
|
|
|
|
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.
|
|
O(n), where n is count. Return the list which on consumption will consist of at most 'n' elements of the input list.
|
|
|
|
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).
|
|
|
Full Usage:
LazyList.tryFind predicate source
Parameters:
'T -> bool
source : LazyList<'T>
Returns: 'T option
|
O(n), worst case. Apply the given function to successive elements of the list, returning the first
result where function returns
|
|
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.
|
|
O(n), where n is count. Return option the list which skips the first 'n' elements of the input list.
|
|
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.
|
|
O(n), where n is count. Return the list which on consumption will consist of at most 'n' elements of the input list.
|
|
|
|
|
Full Usage:
LazyList.unfold arg1 arg2
Parameters:
'State -> ('T * 'State) option
arg1 : 'State
Returns: LazyList<'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.
|
|
|