Skip to content

Add examples for Deque and OrderedSet - #438

Open
timarutun wants to merge 1 commit into
apple:mainfrom
timarutun:add-examples
Open

Add examples for Deque and OrderedSet#438
timarutun wants to merge 1 commit into
apple:mainfrom
timarutun:add-examples

Conversation

@timarutun

Copy link
Copy Markdown

Description of Changes: Two code examples have been added to demonstrate the usage of Deque and OrderedSet data structures:

For Deque, an example was created that shows how to add elements from both ends and remove them, demonstrating its functionality.
For OrderedSet, an example was added to show how to work with unique elements while maintaining insertion order, including operations for adding and removing elements.
Rationale for Changes: The addition of examples helps users quickly understand how to use these data structures and improves the project's documentation. These changes can be particularly helpful for beginners and developers looking for code examples

Checklist

  • I've read the Contribution Guidelines
  • My contributions are licensed under the Swift license.
  • I've followed the coding style of the rest of the project.
  • I've added tests covering all new code paths my change adds to the project (if appropriate).
  • I've added benchmarks covering new functionality (if appropriate).
  • I've verified that my change does not break any existing tests or introduce unexplained benchmark regressions.
  • I've updated the documentation if necessary.

@timarutun
timarutun requested a review from lorentey as a code owner November 29, 2024 03:57
@lorentey

Copy link
Copy Markdown
Member

These look good to me, thanks!

I wonder if Documentation/ is the best place for these -- with the advent of DocC, I think we would prefer to collect such things in the package's docset, rather than in standalone files.

@aluco100 aluco100 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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.

3 participants