Skip to content

Conversation

@seldridge
Copy link
Member

Add an additional associate method that can be used for multiple ports.
I'm finding myself frequently writing the following and this avoids it:

Seq(x, y, z).foreach(associate(_, A))

Release Notes

Add additional domain associate method that accepts a sequence of ports.

Add an additional `associate` method that can be used for multiple ports.
I'm finding myself frequently writing the following and this avoids it:

``` scala
Seq(x, y, z).foreach(associate(_, A))
```

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge added the Feature New feature, will be included in release notes label Dec 15, 2025
@seldridge seldridge requested a review from jackkoenig December 15, 2025 18:54
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

I'm wondering if we've chosen the wrong type for the varargs. Should we instead have the Data as the varargs and the domains as the first argument either single or Seq?

Non-blocking, we can make that change later if we think it's right.

@seldridge
Copy link
Member Author

Yeah... I was thinking something similar. I do like your sketch of associate that takes a thunk, too.

Honestly, any varargs may just be weird here as I can see wanting either. Maybe just switching to a Seq for both is better. Alternatively, can you have both methods that support both vararg variants?

@seldridge seldridge enabled auto-merge (squash) December 15, 2025 19:02
@seldridge seldridge merged commit 5d1eb7f into main Dec 15, 2025
20 checks passed
@seldridge seldridge deleted the dev/seldridge/associate-multiple branch December 15, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants