This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-01
Channels
- # bangalore-clj (1)
- # beginners (16)
- # bigdata (1)
- # boot (16)
- # cljs-dev (79)
- # cljsjs (37)
- # cljsrn (62)
- # clojars (1)
- # clojure (260)
- # clojure-austin (3)
- # clojure-dev (3)
- # clojure-dusseldorf (3)
- # clojure-italy (1)
- # clojure-russia (32)
- # clojure-serbia (2)
- # clojure-spec (8)
- # clojure-uk (146)
- # clojure-ukraine (16)
- # clojurescript (66)
- # cursive (27)
- # datomic (57)
- # dirac (124)
- # emacs (10)
- # hoplon (12)
- # juxt (6)
- # keechma (6)
- # lein-figwheel (18)
- # leiningen (6)
- # lumo (51)
- # off-topic (1)
- # om (66)
- # onyx (41)
- # perun (1)
- # play-clj (1)
- # protorepl (9)
- # re-frame (20)
- # reagent (11)
- # ring (4)
- # ring-swagger (10)
- # rum (22)
- # specter (8)
- # sql (2)
- # test-check (5)
- # untangled (27)
- # yada (29)
@alexmiller thanks Alex 🙂
i'm writing a library for performing queries against a web service. almost every function needs to clean the query map coming in before it runs (it just gets it into the right format, checks for correct URIs, etc). is there a better way to tackle this other than to run the clean function within every single query function?
composing every single function with the clean function doesn't feel right either (and i lose parameter info in intellij)
for example, in this function the path parameter can be a string "Some.dot.notation.path" but i'd also like to convert a vector of values into a string path if that's what i'm given instead. i'd have to do that for every single function in this namespace.
is there a core function like haskell's init
? (eg (init [1,2,3]) => [1,2])
)
ah, thanks!
that's a sensible name for it 🙂
@joshkh, just thinking about it conceptually, you have to do some cleaning work for every query, right?
looks like this might be close to what you're looking for: https://github.com/weavejester/decorate
"[Using this library's decoration function] will redefine the [function that is decorated], keeping the metadata intact."