apple / apple/swift-algorithms

Using combinations in a Playground

Open
#190 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
6.3k
Forks
483
PR merge metrics
No merged PRs in 30d

Description

Xcode 14, target iOS is 14.1

When using a combinations in a playground, I get this error -

`error: Test.playground:301:30: error: value of type '[Double]' has no member 'combinations'
for combo in combos.combinations(ofCount: 1...4) {`

Now where else to turn. It seems that the package is successfully added to the project. The playground is in the project with the dependancy added.

The import statement is there.
`import Algorithms
`

Growl, not sure who else to ask?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported call in the Xcode 14 Playground with the stated iOS 14.1 target, using the shown `import Algorithms` and `combos.combinations(ofCount: 1...4)` entry point. Compare the package integration and API availability against the repository's existing tests or examples; done means the Playground can use the intended combinations API without the reported member error.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.