Skip to content

Conversation

dmitrykleymenov
Copy link
Contributor

No description provided.

end

A `Counter` server will exit with `:normal` if there are no messages in 5 seconds
after the initialization or after the last `succ` call:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand what succ stands for, how about naming this :incr since this is a counter?

Copy link
Contributor Author

@dmitrykleymenov dmitrykleymenov May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://en.wikipedia.org/wiki/Successor_function
I thought succ better explains what is going on, initial thought was to useincr :-)
Should we change it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to not use abbreviations in documentation. It's clearer to use :success or :increment instead.

end

A `Counter` server will exit with `:normal` if there are no messages in 5 seconds
after the initialization or after the last `succ` call:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
after the initialization or after the last `succ` call:
after the initialization or after the last `:succ` call:

GenServer.call(counter_pid, :succ)
#=> 51

# After 5 secs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# After 5 secs
# After 5 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants