prakashreddy Posted February 27, 2014 Share Posted February 27, 2014 Dear all Vl-some confused me. Why the variation in below lines... (setq nlst (list 0 2 pi pi 4)) (vl-some '= nlst (cdr nlst)) T (vl-some '= (list 1 2 3) (list 2 3)) nil (vl-some '= '(1 2 3) '(2 3)) nil Thanks Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 27, 2014 Share Posted February 27, 2014 (setq nlst (list 0 2 pi pi 4)) (vl-some '= nlst (cdr nlst)) T The is true because the first item from the first list is equal to the first item in the second list so it is T . (vl-some '= (list 1 2 3) (list 2 3)) nil This one is nill because each item from the two lists is not equal to each other so it is NIL . (vl-some '= '(1 2 3) '(2 3)) nil This one is the same like the previous one . Quote Link to comment Share on other sites More sharing options...
prakashreddy Posted February 27, 2014 Author Share Posted February 27, 2014 This one is nill because each item from the two lists is not equal to each other so it is NIL . . (vl-some '= (list 0 2 pi pi 4) (list 2 pi pi 4)) T Please Check the above line Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 27, 2014 Share Posted February 27, 2014 (vl-some '= (list 0 2 pi pi 4) (list 2 pi pi 4)) T Please Check the above line My reply was correct and indicating to the correct one . The following one is correct due to equal items in the two lists . (vl-some '= (list 0 2 [color=blue]pi[/color] pi 4) (list 2 pi [color=blue]pi[/color] 4)) Clear ? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 27, 2014 Share Posted February 27, 2014 Test these to see the differences . (vl-some '(lambda (j k) (if (= j k) (print j) ) ) (list 0 1 7 10) (list 1 2 7 10) ) (vl-some '(lambda (j k) (if (= j k) (print j) ) ) (list 0 1 2 10) (list 1 2 3 10) ) Quote Link to comment Share on other sites More sharing options...
prakashreddy Posted February 27, 2014 Author Share Posted February 27, 2014 yes, now i understood thank you Mr. tharwat. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted February 27, 2014 Share Posted February 27, 2014 yes, now i understood thank you Mr. tharwat. You're welcome . Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted February 27, 2014 Share Posted February 27, 2014 Please Google the question before posting a new thread, existing explanations may be found here: vl-some function evaluation vl-some function evaluation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.