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

Re: User input validations, design doubt

2017-02-10 Thread Rastko Soskic
Hey, thanks, I like your idea of utilizing closure as poor's man object (or vice versa if you like :) ) to encapsulate particular validators. However, one note is that I was opting for a more dynamism/flexibility like simply associating field with set of arbitrary composed set of validators.

User input validations, design doubt

2017-02-08 Thread Rastko Soskic
Hi everyone, this is simply question for of course opinionated views of my approach. I have some user input (nevertheless where it comes from, web form input, rich client... whatever). Single field can be (as usual) "equipped" with couple of validations, empty, format, strength (if it is about

Re: Just quick review - "idiomaticy" check (Selection sort)

2016-10-10 Thread Rastko Soskic
Yeah you are right, it is simpler, I just wanted to avoid usage of any sort* function, I've probably gone too far :) *split-at* is cool reminder :) totally forgot about it :) Thanks! On Monday, October 10, 2016 at 3:33:16 PM UTC+2, Moe Aboulkheir wrote: > > Here's an example w/ iterate & a

Just quick review - "idiomaticy" check (Selection sort)

2016-10-10 Thread Rastko Soskic
Hi, I thought perhaps asking on IRC instead here - but chose here anyway :) I am doing just some exercises in scope of various algorithms, data structures etc. Currently, in scope is *selection sort*. I came up of this implementation in Clojure (original examples are in Python and Ruby where

Scala for-comprehension to Clojure

2015-11-26 Thread Rastko Soskic
Hi, I am aware of philosophical differences of Scala and Clojure but functional programming should be a pretty common ground :) Thus I need help, I am trying to mimic Scala's for comprehension in Clojure. Hopefully someone will be able to aid me with the following (perhaps more familiar with

Re: Scala for-comprehension to Clojure

2015-11-26 Thread Rastko Soskic
.org/clojure.core/for >> >> Would that help you? >> >> Torsten. >> >> PS: I'm learning Clojure myself with Scala and Java background. >> >> On Thursday, November 26, 2015 at 12:12:01 PM UTC+1, Rastko Soskic wrote: >>> >>> Hi, >&

Re: Lazy fold-right, help with Scala translation

2015-10-08 Thread Rastko Soskic
Posted before finishing :) Thanks in advance for any tip/suggestion. Cheers, R. -- 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 from new members are moderated - please be

Lazy fold-right, help with Scala translation

2015-10-08 Thread Rastko Soskic
Hi, I have come up this implementation of fold-right in Scala: def foldRight[B](z: => B)(f: (A, => B) => B): B = // Here, arrow => in front of argument means it is arg by name (lazy) and won't be evaluated until required // z - init, f - combining f, and target sequence is this match {

Re: Port of simple Scala match to Clojure core.match

2015-07-18 Thread Rastko Soskic
Great :) thanks :) On Friday, July 17, 2015 at 2:14:50 AM UTC+2, Jonathan Winandy wrote: Hello ! I think, this branch (without : empty?)) (match [l prefix] *[_ ([] :seq)] true* ​is already checking that prefix is empty. ​Have a nice day, Jon On 16 July 2015 at 23:06, Rastko

Port of simple Scala match to Clojure core.match

2015-07-16 Thread Rastko Soskic
Hi, I am getting familiar with Clojure's core.match and simply starting with something simple and familar (some Scala match expressions) and translating that to core.match variant: Check out this function which checks whether sequence starts with another: def startsWith[A](l: List[A], prefix: