Is anybody using Clojure app on Azul Zing JVM ? It ships with LLVM
based JIT and pauseless garbage collector.
How was the experience compared to Standard Oracle HotSpots JVM ?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s
(zipmap inviteds (repeat 1))
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
From: clojure@googlegroups.com on behalf of Renata
Soares
as an aside, :1 etc. are bad keywords (accepted by some readers and not
others, technically not valid according to the docs), and usually the
presence of keywords like that indicates over-eager keywordizing of json
input, or a misunderstanding of clojure hash-maps
On Wed, May 16, 2018 at 12:38 PM
Hi Renata,
The problem with your code is that it is using *map* at the top level,
which is a function that returns a lazy sequence. You are asking clojure to
do something like:
*Take each number n in inviteds and create a sequence of hash maps, where
each hash map has n as a key and 1 as it's val
If you have a sequence of maps then merge is your friend:
(def maps = [{:2 1} {:4 1}])
(apply merge maps)
To create convert a sequence into a map whose key is always 1:
(into {} (map (fn [x] [x 1]) [:2 :4]))
HTH
> On 16 May 2018, at 18:08, Renata Soares wrote:
>
> Hello,
>
> I have this ve
Hi Renada,
The magic function you're looking for is called "frequencies":
https://clojuredocs.org/clojure.core/frequencies
You could look at its implementation if you want to know how to implement
this :)
lvh
On Wed, May 16, 2018 at 12:08 PM, Renata Soares
wrote:
> Hello,
>
> I have this ve
Hello,
I have this vec called *inviteds* [:2 :4]
and I want to produce something like (hash-map :2 1, :4 1)
(doall (map #(hash-map % 1) *inviteds*))
but returns ({:2 1} {:4 1})
How can I produce the same result as (hash-map :2 1, :4 1) with doall (or
other similar function)?
Thanks!
--
You
Hi,
I don't know if this is off topic, so I apologize in advance.
I have upgraded to the Leiningen 2.8.1 and since then I have not been able
to open a repl.
This is on Windows, behind a proxy, being launched from in Cygwin. Where
as Leiningen 2.7.1 repl works from when launched in Windows Com