Thanks for the answer, I try to explain better what I have to do.

I need to create some nodes in Neo4j then I need to create relationships 
between those nodes.

This is an example taken from necons doc.

(let [conn  (nr/connect "http://localhost:7474/db/data/";)
        page1 (nn/create conn {:url "http://clojurewerkz.org"})
        page2 (nn/create conn {:url "http://clojureneo4j.info"})
        ;; a relationship that indicates that page1 links to page2
        rel   (nrl/create conn page1 page2 :links)]
    (println rel)))

They create two nodes called page1 and pag2 then connect them.

In my case I have a list of names, I want to create one node for each of 
them with the possibility to work on nodes after they are created.
So if I have for example  a list like this one (def mylist '(j"john" "paul" 
"mary")) I want to create three nodes calling them john paul and mary 
storing the value "John" "Paul" "Mary" and after having created them I want 
to be albe to connect nodes creating a relationship among them, with a 
funciont like   rel   (nrl/create conn john paul :friend)]

I hope this example explain better my needs.

Thanks in advance

Francesco


On Tuesday, June 10, 2014 6:11:16 PM UTC+2, James Reeves wrote:
>
> Could you explain a little more what your end goal is?
>
> It sounds like you want a map, but without knowing more about the purpose, 
> it's difficult to say.
>
> - James
>
>
> On 10 June 2014 16:43, Francesco Lunelli <francesc...@gmail.com 
> <javascript:>> wrote:
>
>> Hello everybody, I have a newbie question about destructuring and 
>> assigning and didn't find an answer in documentation or books.
>>
>> I have a list that contains an arbitrary number of elements for example 
>> '("one" "two" "three" ...) I now only that elements are strings.
>>
>> I need to to take every element and use it as the name of a variable 
>> inside a let and assign the result of a funcion on that element to that 
>> variable.
>> Somthing like this for example:
>>
>> (let [one  (clojure.string/capitalize "one")
>>       two (clojure.string/capitalize "two")
>>       three (clojure.string/capitalize "three")]
>>      ;; here I have access to vars one two three etc. 
>>       )
>>       
>> where the names of the vars are taken from the list and values are 
>> obtained applying a function on the corresponding element of the list (the 
>> capitalize function il only an example, it could be everything else).
>>
>> If I do in this way 
>> (for [word ["the" "quick" "brown" "fox"]] (let [word 
>> (clojure.string/capitalize word)] (prn word)))
>> it works, but I need to access the variables outside of the cycle for, 
>> after having defined and assigned everyone because I need to put in 
>> relation some of them.
>>
>> Thanks to everybody
>>
>> Francesco
>>
>>  
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to