tailrecursion

Rewrite nested Clojure data with a declared shape.

21
1
100% credibility
Found Feb 04, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Clojure
AI Summary

restructure is a Clojure library that simplifies rewriting specific parts of nested data structures by declaring the shape and transformations in one concise place.

How It Works

1
🔍 Discover a data helper

You're working with nested lists and maps of information, like orders and user carts, and you find a simple tool that makes reshaping them easy.

2
📖 Explore easy examples

You read through clear stories showing how to pick parts of your data and change just what you need, without touching everything.

3
Describe your changes

You outline the shape of your data and jot down simple rules for updating numbers, filtering entries, or renaming items in one spot.

4
🧩 Apply the magic

You use the tool on your data, and it neatly rewrites only the selected spots, keeping everything else perfect.

5
See the speedup

Your changes happen fast, without slogging through the whole structure, and the result matches exactly what you wanted.

🎉 Data reshaped perfectly

Now your information is clean, organized, and ready for use, saving you time and headaches every day.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 18 to 21 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is restructure?

restructure is a Clojure library for rewriting nested data structures using a declarative selector that defines the exact shape to traverse and update. It compiles your selector and rewrite rules into efficient code akin to `update` or `mapv`, but targets only the paths you specify, avoiding full tree walks. Tell a colleague: it's like a precise data chisel for known shapes in configs, API responses, or JSON-like payloads.

Why is it gaining traction?

Unlike verbose chains of `update-in` or `clojure.walk/postwalk`, restructure keeps traversal shape and logic side-by-side in one `over` form, generating optimized code that preserves structural sharing and skips untouched parts. Developers dig the query-like selectors for maps, vectors, and nested destructuring, with guards to filter or elide elements—cleaner than manual reduces for targeted rewrites. It's not mod_rewrite github or url rewrite github tools, nor open rewrite github for codebases; this hooks Clojure folks tired of boilerplate for github restructure-like data ops.

Who should use this?

Clojure backend devs normalizing vendor SKUs in order DBs, processing user maps with email casing and active filters, or transforming nested configs without full scans. Data pipeline engineers handling known-shape payloads from APIs or queues. Skip if you're into restructuredtext vs markdown docs or restructure game mods— this is pure Clojure data surgery.

Verdict

With 21 stars and 1.0% credibility score, it's early-stage but battle-tested via solid examples and Clojars deploys; docs shine but await broader adoption. Try for precise nested rewrites if plain Clojure feels clunky—solid niche win, not daily driver.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.