Creates a iterator from any function. func will be called once per next() call and will stop once the value of
sentinel (default: undefined) is returned from func. Behaves similarly to a generator function, except without
the use of yield statements.
Creates a iterator from any function.
func
will be called once pernext()
call and will stop once the value ofsentinel
(default: undefined) is returned fromfunc
. Behaves similarly to a generator function, except without the use ofyield
statements.