Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 2.37 KB

README.md

File metadata and controls

58 lines (44 loc) · 2.37 KB

Go Reference

Missing abstract data types for Go

We've already got generic type-safe slices and maps since Go 1.21, but we want more.

Sub packages provided here share some common patterns:

Roadmap

  • set
  • heap
  • list
  • skip list
  • ring
  • stack?
  • queue?
  • chainable maps?
  • chainable slices?

Usage

go get github.com/houz42/abstract@latest

If you want to try the experimental iterator and range func features, set environment variable GOEXPERIMENT=rangefunc before running any go command:

GOEXPERIMENT=rangefunc go install my/program
GOEXPERIMENT=rangefunc go build my/program
GOEXPERIMENT=rangefunc go test my/program
GOEXPERIMENT=rangefunc go test my/program -bench=.

See the range func wiki for more details.

Development

To develop with the experimental features, follow the gist to install gotip and least gopls and configure vs code.