Thomvis/BrightFutures

Question: Enforcing order of execution when dealing with many futures

Closed this issue · 1 comments

This feels like I'm making it harder than it needs to be......suppose you have n closures that return futures:

var methods: [() -> Future<String, MyError>]

Suppose I want to execute these closures IN ORDER (such that methods[n+1] will begin execution at the completion of methods[n]). At first I thought I wanted the sequence() method, but that method assumes I have FUTURES instead of closures that RETURN a future. Is this ACTUALLY a hard problem, or am I being an idiot?

Closing this issue because of inactivity. Feel free to reopen if you have an update.