Companion object for the LazyMonad type. Provides factory methods to create instances of LazySequence, which is a concrete implementation of LazyMonad.
Attributes
Members list
Value members
Concrete methods
Method to construct a new LazySequence from an iterable with, effectively, no filter nor predicate.
Method to construct a new LazySequence from an iterable with, effectively, no filter nor predicate.
Type parameters
- T
-
the underlying type of ts.
- U
-
the underlying type of the resulting Iterable.
Value parameters
- f
-
a function to turn a T into a U.
- p
-
A predicate which is a pre-filter (applies to the wrapped values, before being mapped with f).
- ts
-
the iterable to be wrapped.
Attributes
- Returns
-
a new LazySequence based on ts.
Method to construct a new LazySequence from an iterable with, effectively, no filter nor predicate.
Method to construct a new LazySequence from an iterable with, effectively, no filter nor predicate.
Type parameters
- T
-
the underlying type of ts.
Value parameters
- ts
-
the iterable to be wrapped.
Attributes
- Returns
-
a new LazySequence based on ts.
Method to construct a new LazySequence from an iterable with a function but no filtration.
Method to construct a new LazySequence from an iterable with a function but no filtration.
Type parameters
- T
-
the underlying type of ts.
- U
-
the underlying type of the resulting Iterable.
Value parameters
- f
-
a function to turn a T into a U.
- ts
-
the iterable to be wrapped.
Attributes
- Returns
-
a LazyMonad[T, U] based on ts and f (with no filtration).
Method to construct a new LazySequence from an iterable with a filter but no function.
Method to construct a new LazySequence from an iterable with a filter but no function.
Type parameters
- T
-
the underlying type of ts.
Value parameters
- p
-
A predicate which is a pre-filter (applies to the wrapped values, before being mapped with f).
- ts
-
the iterable to be wrapped.
Attributes
- Returns
-
a new LazySequence[T, T]