LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2008, 10:38 PM   #1
zaxonus
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 15
Trying out CLISP.


This must be a very basic Lisp question.
But after all I am a Lisp beginner, so I beg your pardon -.

Let us say I define a list as follow :
(setq VLX '(0 1 2 3 4 5 6 7 11 13 17 19))
The interpreter replies :
(0 1 2 3 4 5 6 7 11 13 17 19)
and my list is defined.

Now, here is my question :
Which function call should I make to get this answer ?
(0 1 2 3 4 5 6 7 11 13 17 19)

In other word I want the same as if I do :
(reverse (reverse VLX))
or
(car (list VLX))
but in a simpler way.

Thanks in advance for any tip.
 
Old 08-06-2008, 12:07 AM   #2
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
As far as I can see, you want to return the list itself? Well, nothing could be simpler:

Code:
VLX
 
Old 08-06-2008, 12:17 AM   #3
zaxonus
Member
 
Registered: Jul 2005
Posts: 66

Original Poster
Rep: Reputation: 15
Trying out CLISP.

Yes it works, thanks.
I wanted to return the list itself indeed.

I had tried (VLX) and different things before but not the simplest.

Bye

Last edited by zaxonus; 08-06-2008 at 12:18 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
clisp and libsigsegv trainee Slackware 0 12-24-2005 10:52 AM
A Clisp probelm keyboard Programming 7 12-01-2005 06:15 AM
SML and Clisp turtorial Haraldsh Linux - General 0 01-19-2005 11:08 AM
where do I learn AI with CLISP/LISP ? pepo Programming 4 01-25-2003 05:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration