Skip to content

AsyncSeq.groupBy, AsyncSeqSrc, docs#47

Merged
eulerfx merged 10 commits intofsprojects:masterfrom
eulerfx:groupby
Apr 2, 2016
Merged

AsyncSeq.groupBy, AsyncSeqSrc, docs#47
eulerfx merged 10 commits intofsprojects:masterfrom
eulerfx:groupby

Conversation

@eulerfx
Copy link
Copy Markdown
Contributor

@eulerfx eulerfx commented Mar 31, 2016

Adding AsyncSeq.groupBy and a few accompanying functions, particularly AsyncSeqSrc.

The former allows workflows such as the following:

source
|> AsyncSeq.groupBy (fun item -> item.id % 4)
|> AsyncSeq.mapAsyncParallel (
  snd >> AsyncSeq.bufferByCountAndTime 100 100 >> AsyncSeq.iter action)
|> AsyncSeq.iter ignore

The above workflow buffers elements in a group and processes groups in parallel. The implementation of AsyncSeq.groupBy uses AsyncSeqSrc which is an imperative source of async sequences (borrowed from Hopac).

Examples are in the tests project.

@eulerfx eulerfx changed the title AsyncSeq.groupBy, AsyncSeqSrc AsyncSeq.groupBy, AsyncSeqSrc, docs Apr 1, 2016
@eulerfx
Copy link
Copy Markdown
Contributor Author

eulerfx commented Apr 1, 2016

@dsyme, if you've no objections, I will merge this and do a beta release.

@eulerfx eulerfx merged commit 2172fda into fsprojects:master Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant