Fork me on GitHub

I’m a complete novice with specter (fired it up about a day ago), but I’m liking it so far. One thing that strikes me about the library is that it lends itself very well when you’re trying to simulate an “update in place” of a complex data structure. However, when I’m trying to completely change the shape of one data structure into a different structure (e.g. for transformation at a contract boundary), I find myself fighting with it a bit more. Am I right in my thinking that this is more suited for changing values in an existing data structure, or was this library also intended to help reshape data structures, and I’m not yet understanding which of the helpers are used for that. What I’ve been doing to date is calling select and collecting the values that I’m interested in, and then simply arranging the collected values into whatever shape I need. Is that the right approach?


@okocim you have it right, specter excels at doing partial changes of a data structure


if you're restructuring the whole thing, specter probably won't help that much


@nathanmarz Thanks for confirming, and thanks for the library. The partial update use-case is the one that I primarily used this for, and it really does feel like you’re providing a piece that’s missing in core clojure :thumbsup: