On Tuesday, 26 May 2015 06:43:18 UTC+10, Krzysiek Herod wrote:
>
> Sean, maybe my use case is specific to web applications. In REST API's
> it's common to respond with something like "Example Result" here:
> https://dev.twitter.com/rest/reference/get/statuses/mentions_timeline I
> completely agr
On Sunday, 17 May 2015 01:46:14 UTC+10, g vim wrote:
>
>
>
> (c/to-timestamp "1967-07-31 06:30:00 America/Caracas")
>
> evaluates to nil. However:
>
> (c/to-timestamp "1967-07-31 06:30:00")
>
> gives me an: #inst "1967-07-31T06:30:00.0-00:00" ,
> whatever that is, so I che
I use partial for a sort-of-similar scenario. It gets you a reasonable way
there without adding any real complexity.
(defn do-stuff [db coll m]
(let [update (partial update db coll)
insert (partial insert db coll)]
(insert m)
(update m)
...))
You could wrap it with a macro
On 16 January 2011 05:35, Jason Wolfe wrote:
>> (a) unsafe/incorrect value on overflow/fastest/unifiable* vs.
>> (b) safe/error on overflow/fast/unifiable vs.
>> (c) safe/promoting on overflow/slow/not-unifiable
>
> If I understand correctly, the issue with auto-promotion is that we
> have to box
> (defrecord Foo [properties]
> Fooable
> (foo [f]
> (let [s (java.util.HashSet.)]
> (doto s
> (doseq [p properties] (.add s p))
>
> When I load/reload the above code in the repl I get this error
>
> vector for its binding (config.clj:22)>
The problem is the way you're cal
> (def nums (cons 2 (lazy-seq (map inc nums
> (def primes (cons (first nums)
> (lazy-seq (->>
> (rest nums)
> (remove
> (fn [x]
> (let [dividors (take-while #(<= (* % %) x)
> primes)]
> (some #(=