You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was surprised to see that Task.sequence runs the tasks in reverse order. If this is working as expected, then the documentation should clearly state this.
For example:
app [main] { cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.12.0/Lb8EgiejTUzbggO2HVVuPJFkwvvsfW6LojkLR20kTVE.tar.br" }
import cli.Taskimport cli.Stdoutrun : U8 -> Task.Task__run = \n ->
n |>Num.toStr|>Stdout.line!
main =
_ = [1,2,3] |>List.map run |>Task.sequence!
Task.ok {}
Prints this:
3
2
1
The text was updated successfully, but these errors were encountered:
I was surprised to see that
Task.sequence
runs the tasks in reverse order. If this is working as expected, then the documentation should clearly state this.For example:
Prints this:
The text was updated successfully, but these errors were encountered: