Re: trying a functional solution for a recurrent problem

2019-02-07 Thread Pierpaolo Tofani
Il giorno mercoledì 6 febbraio 2019 14:29:07 UTC+1, Pierpaolo Tofani ha scritto: > > Hi > I am trying a functional solution for a recurrent problem. > I must balance 2 vectors : > > I must pass from A1 to A2 with following priority: assign aval qty first > for records with the same :cat ,

Re: [Q] How to load Clojure as part of Wildfly module?

2019-02-07 Thread Kimmo Koskinen
Hi! I ran into the same issue while helping a colleague in working on the [sonar-clojure Sonarqube|https://github.com/hjhamala/sonar-clojure/] plugin. A quick search on Clojure JIRA reveals couple of discussions, [this

Re: [Q] How to load Clojure as part of Wildfly module?

2019-02-07 Thread henrik42
Rastko - thanks for the reply. My /modules/buttle/main/module.xml looks like this: And the driver in standalone.xml: The loading of my classes incl. clojure.lang.RT works "in principle". Only when Clojure

Re: Using map to produce side effects, not working

2019-02-07 Thread Justin Smith
also do note that clojure.core/run! is designed for two-arg map when it's only run for side effects, and clojure.core/doseq is designed for nested side-effecting iteration On Thu, Feb 7, 2019 at 3:33 AM Pierpaolo Tofani wrote: > > Thanks ! Your diagnosis is correct. With two dorun works fine. >

Re: Using map to produce side effects, not working

2019-02-07 Thread Erik Assum
Just as a note, you should probably use `doseq` when you want to produce side effects. Erik. > On 7 Feb 2019, at 12:04, Pierpaolo Tofani wrote: > > Hi > i am new in clojure sorry. > In the snippet of code i used two map functions only to produce side effects > on two ref. > Even using

Re: Using map to produce side effects, not working

2019-02-07 Thread Pierpaolo Tofani
Thanks ! Your diagnosis is correct. With two dorun works fine. Il giorno giovedì 7 febbraio 2019 12:19:40 UTC+1, Orestis Markou ha scritto: > > Without having ran your code, it seems that the inner map is not wrapped > in a doall, so while the outer lazy-seq is forced, the inner is not. > > This

Re: Using map to produce side effects, not working

2019-02-07 Thread Orestis Markou
Without having ran your code, it seems that the inner map is not wrapped in a doall, so while the outer lazy-seq is forced, the inner is not. This might be of interest to you: http://clojure-doc.org/articles/language/laziness.html If

Using map to produce side effects, not working

2019-02-07 Thread Pierpaolo Tofani
Hi i am new in clojure sorry. In the snippet of code i used two map functions only to produce side effects on two ref. Even using doall no affect is produced on ref aaa and zzz, seems that the sequence is still lazy. But if i remove the final :done , and the repl show me the sequence produced

Re: [Q] How to load Clojure as part of Wildfly module?

2019-02-07 Thread Rastko Soskic
Hm, it's been really long a go when I've last dealt with EE container but could you tell how does your module exports are set in module definition? Exports are I believe what defines what is exposed to the "outside" world. Furthermore, it might be that you should also add module imports in your