Creates a new sequential seq, which each element is generated by the given next function applied to the previous element, and the initial element is the seed. The seq terminates when pred(item) returns false.
The returned seq is similar to the for-loop below:
for (G item = seed; pred(item); item = next(item)) {
// Operations on the item.
}
seed |
the initial element |
pred |
a predicate function to determine when the seq terminates |
next |
a mapping function to produce a new element by applying to the previous element |
env |
a task environment. If not specified, TaskEnv.get_common_task_env is used. |
the result seq |