Something went wrong. Try again.
A collection of generic data structures in Go
Something went wrong. Try again.
Files
- Go 100%
README.md
# Collections
[](https://github.com/FollowTheProcess/collections)
[](https://goreportcard.com/report/github.com/FollowTheProcess/collections)
[](https://github.com/FollowTheProcess/collections)
[](https://github.com/FollowTheProcess/collections/actions?query=workflow%3ACI)
[](https://pkg.go.dev/github.com/FollowTheProcess/collections)
[](https://codecov.io/gh/FollowTheProcess/collections)
Collection of generic data structures in Go 📦
- [Collections](#collections)
- [Project Description](#project-description)
- [Installation](#installation)
- [Quickstart](#quickstart)
- [Set](#set)
- [Stack](#stack)
- [Queue](#queue)
- [List](#list)
- [Ordered Map](#ordered-map)
- [DAG](#dag)
- [Counter](#counter)
- [Chain](#chain)
- [Priority Queue](#priority-queue)
> [!TIP]
> Most collections support the Go 1.23 functional iterator pattern
## Project Description
Small, useful, zero dependency implementations of generic collection data structures in Go:
- **Set:** Offers fast membership checking as well as difference, intersection etc.
- **Stack:** Simple LIFO stack
- **Queue:** Simple FIFO queue
- **List:** A doubly-linked list
- **OrderedMap:** A map that remembers the order in which keys were inserted
- **DAG:** A generic directed acyclic graph
- **Counter:** A convenient construct for counting occurrences of things (similar to Python's [collections.Counter])
- **Chain:** A chain of maps, lookups first look in one map, then the next, then the next, returning the fir…