On Sun, Sep 30, 2012 at 2:59 PM, arekanderu <arekand...@gmail.com> 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 in
> Ruby and i am trying to re-write it the clojure way because...well....its
> very ugly.

Why does my-map have vectors storing maps inside instead of a map with
maps inside?

> I have a complex hash map which it's structure is always the same and the
> keys always known and by using the values in those keys, i make some
> function calls with those values as parameters. You can find a simplified
> version of the map and the function which steps into the map below.

May you write some tests to demonstrate what you want to accomplish
with the ugly map and share them here?

> I would really appreciate it if someone could propose an alternative way
> of writing the above function or at least to point me where can I look for
> some useful clojure functions that will help me do what I want but in a
> cleaner way.

Once you provide tests then we have a better chance at helping.

--
((λ (x) (x x)) (λ (x) (x x)))
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE

-- 
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 patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to