Re: Query regarding `conj'

2009-11-27 Thread Richard Newman
> (rest *v1) is equal to *v2 in the below mentioned example. Then why > `conj' operation on them is returning different things. rest is giving you a seq. conj is thus producing a cons where the first is 0 and the rest is that seq. (Essentially, seqs are treated as lists, and thus print with

Re: Query regarding `conj'

2009-11-27 Thread Lauri Pesonen
Hi Nipra, 2009/11/27 nipra : > Hi, >  (rest *v1) is equal to *v2 in the below mentioned example. Then why >  `conj' operation on them is returning different things. > > user> (def *v1 [1 2 3 4 5]) > #'user/*v1 > user> (def *v2 [2 3 4 5]) > #'user/*v2 > user> (= (rest *v1) *v2) > true > user> (def

Query regarding `conj'

2009-11-27 Thread nipra
Hi, (rest *v1) is equal to *v2 in the below mentioned example. Then why `conj' operation on them is returning different things. user> (def *v1 [1 2 3 4 5]) #'user/*v1 user> (def *v2 [2 3 4 5]) #'user/*v2 user> (= (rest *v1) *v2) true user> (def *v3 (conj (rest *v1) 0)) #'user/*v3 user> *v3 (0