Skip to content

[stdlib] Add 'equal()' function to checking for equal numbers #81586

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jiaxu-Li
Copy link

@Jiaxu-Li Jiaxu-Li commented May 17, 2025

Motivation

'equal()' can returns all mutually equal values ​​in the input values. Currently, developers can only troubleshoot.

What's new

I add 'equal()' in Algorithm.swift.
I add Equal.swift in test.

Platform Verification

Tested on: macOS (arm64)

  • ✅ Successful build.
  • ✅ All stdlib tests passed except 3 unrelated known failures:
    • abi/macOS/arm64/stdlib-asserts.swift
    • api-digester/stability-stdlib-abi-with-asserts.test
    • benchmark/benchmark-scripts.test-sh
  • ✅ New test Equal.swift added and passed

### Motivation
'equal()' can returns all mutually equal values ​​in the input values. Currently, developers can only troubleshoot.

### What's new
I add 'equal()' in Algorithm.swift.
I add Equal.swift in test.

### Platform Verification
Tested on: macOS (arm64)
- ✅ Successful build.
- ✅ All stdlib tests passed except 3 unrelated known failures:
  - `abi/macOS/arm64/stdlib-asserts.swift`
  - `api-digester/stability-stdlib-abi-with-asserts.test`
  - `benchmark/benchmark-scripts.test-sh`
- ✅ New test `SortedByLength.swift` added and passed
@Jiaxu-Li Jiaxu-Li requested a review from a team as a code owner May 17, 2025 11:28
@Jiaxu-Li
Copy link
Author

@swift-ci please test

1 similar comment
@Jiaxu-Li
Copy link
Author

@swift-ci please test

@Jiaxu-Li
Copy link
Author

@swift-ci please test macOS platform.

@Jiaxu-Li
Copy link
Author

👋Hi! First-time contributor here 😄 I noticed that CI hasn’t been triggered on this PR. Just wondering if anything is blocking it or if it needs approval to run. 💻

Looking forward for your reply. Thanks so much! 🙏

@Jiaxu-Li
Copy link
Author

@swift-ci please test

1 similar comment
@Jiaxu-Li
Copy link
Author

@swift-ci please test

@lorentey lorentey added the swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal label May 31, 2025
@lorentey
Copy link
Member

lorentey commented May 31, 2025

Thanks for taking the effort of putting together a PR!

Public API additions like this can only land through the Swift Evolution process.

Having an implementation is a good first step; but the addition needs to be pitched and then formally proposed on the forum before we can land it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift evolution proposal needed Flag → feature: A feature that warrants a Swift evolution proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants