New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I call runNext() multiple times? #3
Comments
Basically you can do what you want with ’runNext()’ |
The problem with this is that if I change (let's say) a boolean in the Me.start { (me) in
MyAPI.posts { posts in
for (index, post) in posts.enumerated() {
if let post = post {
me.parameters["post"] = post
me.parameters["stop"] = index < (posts.count - 1) ? false : true
me.runNext()
}
}
}
}.next { (caller, me) in
MyAPI.likes(post: caller.parameters["post"]) {
if caller?.parameters["stop"] as! Bool == true {
me.end()
}
}
}.run() And Did I get your advice in a wrong way? Thanks |
What if:
|
Yeah that should work, thanks! 👍 |
I was wandering if the library was thought to being able to run the next block multiple times.
And if yes, when one should call the
end()
function (if the last block is called multiple times)?The text was updated successfully, but these errors were encountered: