Hello all,
I am new to clojure and I have two questions about do and the way it should
be used.
*Question 1: Which of the following two functions is more idiomatic and
why? Both functions produce the same result.*
code
(defn my-fn [java-object]
(. java-object firstFunc)
(. java-object
Thank you Meikel for your so helpful replies.
On Thursday, September 27, 2012 4:19:44 PM UTC+3, Meikel Brandmeyer
(kotarak) wrote:
Hi,
Am Donnerstag, 27. September 2012 12:16:41 UTC+2 schrieb arekanderu:
I am new to clojure and I have two questions about do and the way it
should be used
Hello,
I am trying to port an ugly piece of code from Ruby to clojure. So far I
have only ported it to clojure by keeping the same way it was written in
Ruby and i am trying to re-write it the clojure way because...wellits
very ugly.
I have a complex hash map which it's structure is always
+3, Grant Rettke wrote:
On Sun, Sep 30, 2012 at 2:59 PM, arekanderu areka...@gmail.comjavascript:
wrote:
I am trying to port an ugly piece of code from Ruby to clojure.
May you share the original code?
So far I
have only ported it to clojure by keeping the same way it was written
+3, arekanderu wrote:
Thank you for your prompt reply Grant.
* May you share the original code? *
*
*
I will post the original function very soon*
*
* Why does my-map have vectors storing maps inside instead of a map with
maps inside? *
*
*
Because each vector will have more than one
(:items box)] (do-something (:box box) (:item item)))
(do-something-else (:warehouse warehouse)
(:container container)
(:box box)
Might be more appropriate...
On Mon, Oct 1, 2012 at 5:07 PM, arekanderu areka...@gmail.comjavascript
Thank you for your input Stathis, I will have a look at them as well.
On Sunday, September 30, 2012 10:59:05 PM UTC+3, arekanderu wrote:
Hello,
I am trying to port an ugly piece of code from Ruby to clojure. So far I
have only ported it to clojure by keeping the same way it was written
Hello,
I had a similar question as the OP so I thought i should post it in this
thread instead of starting a new one.
I am trying to build a web services api which will only respond in json
format. I had a look at everything suggested in this topic and I am leaning
towards noir. Do you think
, arekanderu areka...@gmail.comjavascript:
wrote:
Hello,
I had a similar question as the OP so I thought i should post it in this
thread instead of starting a new one.
I am trying to build a web services api which will only respond in json
format. I had a look at everything suggested
Hello,
I am not sure if i am supposed to ask a noir-related question in the group
but the noir issues at github https://github.com/bitwalker/noir is closed
so i thought someone here might know. I am trying to use a custom
:
It seems to be using cheshire under the covers, did you add an encoder
for your class? e.g:
(add-encoder java.awt.Color
(fn [c jsonGenerator]
(.writeString jsonGenerator (str c
On Thu, Oct 4, 2012 at 12:04 PM, arekanderu areka...@gmail.comjavascript:
wrote:
Hello
, October 4, 2012 8:32:25 PM UTC+3, arekanderu wrote:
Hi Gaz
That's exactly the part that I can't figure out. Where exactly am I
supposed to do that? Inside the clj where I am going to use noir.response?
My apologies if my question seems silly but I am a bit brain-blocked
UTC+3, arekanderu wrote:
In fact, on the latest commit,
response.cljhttps://github.com/bitwalker/noir/blob/master/src/noir/response.cljdoes
not seem to use chesire.custom anymore even though this
commithttps://github.com/bitwalker/noir/commit
After adding the dependencies of noir to my own project.clj, everything
worked fine :)
I hope that noir developers will make it a bit easier soon...
On Thursday, October 4, 2012 9:26:56 PM UTC+3, arekanderu wrote:
OK, the problem is that the custom encoders isn't merged with the master
tree
I also happened to read an interesting
articlehttp://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/recently
about functional programming by John
Carmack http://en.wikipedia.org/wiki/John_D._Carmack.
On Tuesday, October 30, 2012 9:00:07 AM UTC+2, titon barua wrote:
Hi,
I am
Hello all,
I have the following code:
(def my-hash {1 {:a-key {:value a value} :another-key another value
:a-third-key []}
2 {:a-key {:value a value} :another-key another
value :a-third-key []}}
In the following example i get the following result:
user= (doseq [[id
16 matches
Mail list logo