Skip to content
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

OR-5270 Operators:: Sequence Operators:: Querying values:: count() #120

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

crazymanish
Copy link
Owner

Context

Operators are publishers

  • In Combine, methods that perform an operation on values coming from a publisher are called operators.
  • Each Combine operator actually returns a publisher. Generally speaking, that publisher receives the upstream values, manipulates the data, and then sends that data downstream.

Sequence operators

  • Sequence operators are easiest to understand when you realize that publishers are just sequences themselves.
  • Sequence operators work with the collection of a publisher’s values, much like an array or set — which, of course, are just finite sequences!

Querying values

  • The following operators also deal with the entire set of values emitted by a publisher, but they don't produce any specific value that it emits.
  • Instead, these operators emit a different value representing some query on the publisher as a whole. A good example of this is the count operator.

In this PR

@crazymanish crazymanish requested review from buh and raihan August 6, 2023 17:22
@crazymanish crazymanish merged commit d7cd3b4 into main Aug 6, 2023
@crazymanish crazymanish deleted the OR-5269-p11 branch August 6, 2023 17:22
@crazymanish crazymanish changed the title OR-5269 Operators:: Sequence Operators:: Querying values:: count() OR-5270 Operators:: Sequence Operators:: Querying values:: count() Aug 6, 2023
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.

[w25(18june-24june)] Operators:: Sequence Operators: Query the publisher
1 participant