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 need this to get all pages from the endpoint in one go. Reading a single page yields Async<seq<Result>> , I'd like the result to be presented as AsyncSeq
The text was updated successfully, but these errors were encountered:
Both your solutions work the same way here. If yield! were implemented (not sure it has, since then), it would act the same as your first solution here. After all, sequences are delay-iterated.
If you want the whole result at once, then AsyncSeq is probably not the correct solution. Though, if you already have an Async<seq>, and you want to read all at once, you can just do Async.map Seq.toList.
If you do want AsyncSeq, it'll give you different behavior than you describe, but the solution in your first suggestion above does give you what you want.
For posterity, since a few days, taskSeq was released. In there, you can do taskSeq { yield! items }.
I'd like to turn
Async<seq>
toAsyncSeq
While this works
yield!
version does not:I need this to get all pages from the endpoint in one go. Reading a single page yields
Async<seq<Result>>
, I'd like the result to be presented asAsyncSeq
The text was updated successfully, but these errors were encountered: