Skip to content

Instantly share code, notes, and snippets.

View kalexmills's full-sized avatar

Alex Mills kalexmills

View GitHub Profile
@kalexmills
kalexmills / Go2Go Snippets
Created April 16, 2025 23:34
Go2Go snippets from back when the Go generics proposal was still being considered
# Go2Go Snippets
To better understand the impact of the Go generics proposal, this repository collects a list of solutions to problems that could benefit from generics and links to implementations that run on [The go2go Playground](https://go2goplay.golang.org). Multiple implementations for the same problem are highly encouraged. Having a variety of solutions to look at and compare will help the community learn about approaches to generics that may and may not be useful.
Pull requests are welcome, both for solutions to the problems below and solutions of new problems! Just modify this file to a link to a go2go example that includes a `main` method demonstrating correct usage. Maintainers may run format on your submission and modify the link before merging, but we *will* preserve your original commit in the history.
If you are copying from an online source, please make sure 1) you are able to do so and 2) include a link back to the original material.
If you see an implementation in this list that you have