Give clj-http a try (https://github.com/getwoven/clj-http). It has an
architecture similar to the one of Ring. Especially the Ring-style
middleware helps a lot, if you want to add custom behaviour like error
handling to clj-http.
On 27 Jan., 02:21, Michael Ossareh wrote:
> On Wed, Jan 26, 2011 at
Hi,
Given this example:
(defn hello [& {:keys [a b]}]
"hello")
=> (hello :foo "bar") ; :foo isn't listed!
"hello"
How can I disallow all keys except :a and :b in this example?
Regards,
Shantanu
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
"Laurent PETIT" wrote:
>2011/1/20 Ken Wesson
>
>> On Wed, Jan 19, 2011 at 9:39 AM, Rayne
>wrote:
>> > Aren't you a developer?
>>
>> I'm not a CCW developer.
>>
>> > If a code.google link is the top of google results, that's what I'm
>> > going to click and check out first. code.google is a proj
you could do something like this, but I'm curious --- why do you want
to restrict the function's inputs in this way?
(defn hello [& {:keys [a b] :as input}]
(assert (= (set (keys input)) #{:a :b}))
"hello")
sincerely,
--Robert McIntyre
On Sat, Jan 29, 2011 at 1:19 PM, Shantanu Kumar
wrote:
>
On Jan 30, 1:26 am, Robert McIntyre wrote:
> you could do something like this, but I'm curious --- why do you want
> to restrict the function's inputs in this way?
As they are optional arguments, it's possible that somebody might
misspell a key and spend time debugging. The intention is to avoid
On Sat, Jan 29, 2011 at 1:46 PM, Mike Meyer
wrote:
> Ditto. Most often, the "code" site is the sole project site, and everything
> is there. Some larger projects may have a separate "home" page, but it's
> always prominently mentioned on the "code" site. In either case, the "code"
> site is wo
I see, so you wanted to allow some subset of the optional arguments.
Might I recommend the following?
Sets are already functions that check for inclusion of the objects on
which you call them, so instead of (contains? some-set ele) just
(some-set ele) will work. Also, upon actually making a typo
On Jan 30, 3:18 am, Robert McIntyre wrote:
> I see, so you wanted to allow some subset of the optional arguments.
>
> Might I recommend the following?
> Sets are already functions that check for inclusion of the objects on
> which you call them, so instead of (contains? some-set ele) just
> (som
Hi all,
i stumbled upon this code, and am curious why it's not working:
user> (defn makea []
(def a 232))
#'user/makea
user> (makea)
#'user/a
user> a
232
user> (ns-unmap *ns* 'a)
nil
user> (makea)
#'user/a
user> a
---> Unable to resolve symbol: a in this context
[Thrown class j
On Sat, Jan 29, 2011 at 5:18 PM, Robert McIntyre wrote:
> I see, so you wanted to allow some subset of the optional arguments.
>
> Might I recommend the following?
> Sets are already functions that check for inclusion of the objects on
> which you call them, so instead of (contains? some-set ele)
On Sat, Jan 29, 2011 at 5:42 PM, David Steiner
wrote:
> another question i had: is there a way to destroy java objects in clojure?
> how do i set an object to null, so the garbage collector can do it's thing?
You just discard all references to an object. Clojure's compiler does
something called "
11 matches
Mail list logo