How to convert C++ const_iterator and more to Lisp

Discussion of Common Lisp

How to convert C++ const_iterator and more to Lisp

Postby joeish80829 » Thu May 15, 2014 5:09 am

How do I convert this section of C++ code into Lisp using Lisp lists. I don't really need to show it but I have a C++ vector<int>
I converted into lisp using CFFI. I converted the vector<int> filled with 5 numbers ,to a Lisp List.

Here is the final Lisp list:

Code: Select all
(1 2 3 4 5)

I would like you to hopefully ignore what I said previously and pretend that I'm just starting out with the previously mentioned Lisp list and know I need to operate on it precisely as below so it will fit into the other C++ code I'm converting to Lisp. can you kind gentleman possible show my the exact Lisp equivelant of the below statement, operating on this exact list...
Code: Select all
(1 2 3 4 5)
....thanks in advance for any help on this.

Code: Select all
       for( vector<int>::const_iterator r = number.begin(); r != number.end(); r++ )
Posts: 153
Joined: Tue Sep 03, 2013 5:32 am

Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 4 guests