Skip to content

Deprecate yielder.concat #4

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

Closed

Conversation

JosephTLyons
Copy link
Contributor

@JosephTLyons JosephTLyons commented Dec 12, 2024

yielder seems to mostly follow the interface of list. We deprecated list.concact in favor of list.flatten, in Gleam's spirit of only having one way to do things. Feels like we should do the same thing here.

Reference:

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

These are different functions!

Flatten turns Thing(Thing(a)) into Thing(a)

Concat turns List(Thing(a)) into Thing(a)

@JosephTLyons
Copy link
Contributor Author

Oh huh, that's strange, I actually misread the source code when looking at it. I guess my dyslexia is in full effect right now. Apologies for the time wasted on PRs that haven't made sense - super obvious now.

@JosephTLyons JosephTLyons deleted the deprecate-yielder.concat branch December 16, 2024 13:33
@lpil
Copy link
Member

lpil commented Dec 16, 2024

I should really find some time to document these conventions!

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.

None yet

2 participants