Juniper
Juniper is an extension to the Go standard library using generics, including containers, iterators, and streams.
Install / Use
/learn @bradenaw/JuniperREADME
Juniper
Juniper is a library of extensions to the Go standard library using generics, including containers, iterators, and streams.
container/treecontains aMapandSetthat keep elements in sorted order. They are implemented using a B-tree, which performs better than a binary search tree.container/dequecontains a double-ended queue implemented with a ring buffer.container/xheapcontains a min-heap similar to the standard library'scontainer/heapbut more ergonomic, along with aPriorityQueuethat allows setting priorities by key.container/xlistcontains a linked-list similar to the standard library'scontainer/list, but type-safe.xslicescontains some commonly-used slice operations, likeChunk,Reverse,Clear, andJoin.iteratorcontains an iterator interface used by the containers, along with functions to manipulate them, likeMap,While, andReduce.streamcontains a stream interface, which is an iterator that can fail. Useful for iterating over collections that require I/O. It has most of the same combinators asiterator, plus some extras likePipeandBatch.parallelcontains some shorthand for common uses of goroutines to process slices, iterators, and streams in parallel, likeparallel.MapStream.xsortcontains extensions to the standard library packagesort. Notably, it also has the definition forxsort.Less, which is how custom orderings can be defined for sorting and also for ordered collections like fromcontainer/tree.- You can probably guess what's in the packages
xerrors,xmath,xmath/xrand,xsync, andxtime.
Packages that overlap directly with a standard library package are named the same but with an x
prefix for "extensions", e.g. sort and xsort.
See the docs for more.
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
340.5kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
