It's useful, true, but also about 220x slower than writing a dedicated
helper fn (plus java.util.Date's bean accessors are pretty useless
(:year = year - 1900, :day = day of week, :date = day of month). I
wouldn't use `bean` if you have to deal with lots of dates...
(defn inst->map
[^Calendar t]
Thank you, that is really helpful!
On Wednesday, August 10, 2016 at 11:29:52 AM UTC-6, Toby Crawley wrote:
>
> clojure.core/bean (https://clojuredocs.org/clojure.core/bean) is what you
> want:
>
> (let [{:keys [day month year]} (bean some-date)]
> ...)
>
> On Wed, Aug 10, 2016 at 12:41 PM, Ja
Nice! I didn't know you could that!
On Wed, Aug 10, 2016 at 5:29 PM, Toby Crawley wrote:
> clojure.core/bean (https://clojuredocs.org/clojure.core/bean) is what you
> want:
>
> (let [{:keys [day month year]} (bean some-date)]
> ...)
>
> On Wed, Aug 10, 2016 at 12:41 PM, Jacob Strength
> wrote:
clojure.core/bean (https://clojuredocs.org/clojure.core/bean) is what you want:
(let [{:keys [day month year]} (bean some-date)]
...)
On Wed, Aug 10, 2016 at 12:41 PM, Jacob Strength wrote:
> I'm just curious if it is possible to destructure a date object in say a let
> form?
> For example can
Hi,
I'm developing with clojure/clojurescript since 3 years and I'm currently
looking to create an app to help live streamers (Twitch, Facebook live,
Periscope, YouTube, HitBox etc ...) interact with their viewers.
Right now, the only way to interact is using the chat. Really quickly the
chat
I'm just curious if it is possible to destructure a date object in say a
let form?
For example can I do something like this:
(let [{:keys [day month year]} some-date]
...)
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
Thank you! This was pretty much the answer I was hoping for. I actually
found the ticket but was still baffled that it isn't currently possible.
keskiviikko 10. elokuuta 2016 17.07.40 UTC+3 Alex Miller kirjoitti:
>
> I think you're really talking about reductions, not reduce. In sequence
> form,
I think you're really talking about reductions, not reduce. In sequence
form, like:
user=> (reductions + [0 1 2 3 4 5])
(0 1 3 6 10 15)
There is not currently a reductions transducer although there is a ticket
proposing to add one: http://dev.clojure.org/jira/browse/CLJ-1903
You don't have to
Hi,
I'm wondering why reduce doesn't return a transducer like map does. For
example I'd like to this:
(async/chan 1 (reduce +))
I could use async/reduce but it doesn't provide a result before the source
channel closes, I want to have a streaming result.
What is the philosophy behind not havin
In this case, there is not a specific function to point to, rather the use of a
transducer with a chan is the alternative.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts f
10 matches
Mail list logo