Thanks Meikel, your answer was very clear.

On Wednesday, October 31, 2012 12:49:06 PM UTC+2, Meikel Brandmeyer 
(kotarak) wrote:
>
> Hi,
>
> I'm not sure what you are refering to in the provided link. If it's eg. 
> about :warehouses, then the difference is, that :warehouses contains a 
> vector in the example in the link. So you basically walk the warehouse 
> vector one warehouse at a time. But here you of only a single item (the 
> map), so you have to use :let. In case you'd want to treat the :warehouses 
> vector also as single item (instead of walking it), you'd also have to add 
> a :let there.
>
> Bottom line: :let keeps item as single entity, no-:let walks item as 
> sequence in an inner loop.
>
> (for [x [[1 2] [3 4] [5 6]]
>       y x]
>   y)
>
> => (1 2 3 4 5 6)
>
> (for [x [[1 2] [3 4] [5 6]]
>       :let [y x]]
>   y)
>
> => ([1 2] [3 4] [5 6])
>
> I used for here, but doseq works the same way.
>
> Hope this clarifies.
>
> Meikel
>
>

-- 
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