On 18/06/2014 17:07, Gary Trakhman wrote:
Try http://clojuredocs.org/clojure_core/clojure.core/for
I couldn't get anywhere near what was so easy in Ruby. Nested
enumeration seems difficult in Clojure.
gvim
--
You received this message because you are subscribed to the Google
Groups
Care to explain? How does it get much simpler than:
(for [x some-collection
y x
z y]
z)
On Fri, Jun 20, 2014 at 5:52 AM, gvim gvi...@gmail.com wrote:
On 18/06/2014 17:07, Gary Trakhman wrote:
Try http://clojuredocs.org/clojure_core/clojure.core/for
I couldn't get anywhere
On 20/06/2014 13:38, Timothy Baldridge wrote:
Care to explain? How does it get much simpler than:
(for [x some-collection
y x
z y]
z)
Because it's 3 levels deep and requires substituting the vars back into
maps to then create a returned map. Your for example doesn't
On 20/06/14 15:11, gvim wrote:
Because it's 3 levels deep and requires substituting the vars back
into maps to then create a returned map. Your for example doesn't
emulate Ruby's each_with_index, as in the example, as far as I'm
aware. I'm fairly new to Clojure so the obvious may not be so
Rather than start with the code you are trying to duplicate, consider
the data structure(s) that you have as input and the data structure you
want to end up with.
It's certainly possible to emulate the kind of nested loop structure you
are asking about in Clojure, but most likely it's not how
Sorry, the first example fn is confusing--I'd probably use assoc rather
than update-in:
(reduce #(assoc %1 %2 (do-aspected-stuff ...)) {} personals))
(2014/06/20 22:28), Dave Della Costa wrote:
Rather than start with the code you are trying to duplicate, consider
the data structure(s) that
On 20/06/2014 14:28, Dave Della Costa wrote:
Rather than start with the code you are trying to duplicate, consider
the data structure(s) that you have as input and the data structure you
want to end up with.
It's certainly possible to emulate the kind of nested loop structure you
are asking
I don't think you need plumbing for this.
On Friday, June 20, 2014, gvim gvi...@gmail.com wrote:
On 20/06/2014 14:28, Dave Della Costa wrote:
Rather than start with the code you are trying to duplicate, consider
the data structure(s) that you have as input and the data structure you
want to
I have a method in Ruby that involves 3-level enumeration and would like
to rewrite it in Clojure. Without asking anyone to do the job :), what
is the best equivalent to this kind of Ruby iteration in Clojure? I
looked at prewalk and postwalk but wasn't convinced that was what's
required. Map
Try http://clojuredocs.org/clojure_core/clojure.core/for
On Wed, Jun 18, 2014 at 11:56 AM, gvim gvi...@gmail.com wrote:
I have a method in Ruby that involves 3-level enumeration and would like
to rewrite it in Clojure. Without asking anyone to do the job :), what is
the best equivalent to
10 matches
Mail list logo