Chris Truter

Results 82 comments of Chris Truter

What may not be clear above is that we'd want to be able to produce single keys or lists of keys, from the existing keys. Maybe two different wrapper symbols...

Arity 2 works for the main case - selecting keys based on entire set. Passing object rather than keys is interesting, gives extra power I hadn't considered. Could provide combinators...

The trick with metadata in the path does not seem to work with vars ``` clojure user=> (meta ^:generator #()) ;; {:generator true} user=> (meta ^:generator last) ;; nil ```...

Examples: ``` clojure (defn last? [i xs] (= i (dec (count xs)))) => (transform {:list [1 2 3]} [:list last?] inc) ;; {:list [1 2 4]} (defn prefix [key] (keyword...

With changed generator contract: ``` clojure (defn prefix [key] (keyword (str "pre-" (name key)))) (defn prefix-all [keys] (zipmap keys (map prefix keys))) => (transform {:a 1, :b 2} [(generator prefix-all)]...

Appreciate your concerns about complexity - starting to walk a fine line between expressiveness and obfuscation. Maybe we're overloading this function to much and should just abandon this and #13...

I still like `[:a :b (predicate odd?) :c :d (generator prefix-with "pre-") :e :f]` as syntax. Support metadata on functions as secondary sugar for power users. :lemon:

RE: the case where "what maps to what", we could support a special case where a seq of exactly the same length as input is returned, and assume it maps...

Thanks for the link - interesting library, quite a different approach. Very new library from such an old name :)

+1 to Cal's idea for a test. That's much simpler than trying to fiddle with class loaders, which I'm not sure is even possible.