| | |
Newbie Queston About LISP
Please support our Legacy and Other Languages advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2006
Posts: 17
Reputation:
Solved Threads: 0
This is the first program I have ever written in LISP, and I am completely confused. I need to write a function that returns a list of 5 rows of entries, and each one of these rows is a list of 5 entries. I know that CAR and CDR could be used to return the elements of a specified list, but that's not creating a function to return the list. Any ideas on how I could do this? Thanks in advance!
•
•
Join Date: Sep 2006
Posts: 17
Reputation:
Solved Threads: 0
Would something like this work?
(defun list (row-and-column (1 2 3 4 5
2 3 4 5 1
3 4 5 1 2
4 5 1 2 3
5 1 2 3 4))) Last edited by mikeallen; Mar 3rd, 2007 at 3:40 pm.
•
•
Join Date: May 2006
Posts: 36
Reputation:
Solved Threads: 5
That won't work in common lisp for a number of reasons. This would, though:
Honestly, though, I can't figure out exactly what the OP wanted...
lisp Syntax (Toggle Plain Text)
(defun row-and-column () '((1 2 3 4 5) (6 7 8 9 0) (1 2 3 4 5) (6 7 8 9 0) (1 2 3 4 5)))
Honestly, though, I can't figure out exactly what the OP wanted...
![]() |
Similar Threads
- As a newbie, where i should start from in linux? (Getting Started and Choosing a Distro)
- LISP newbie (Legacy and Other Languages)
- Questions about building a system (was: newbie) (Troubleshooting Dead Machines)
- Book For Newbie (C++)
- Newbie - how do I start C++ programming? (C++)
- PHP newbie, project feasibility (PHP)
- How to network two Win98 machines (Networking Hardware Configuration)
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: Ada: resize CLI
- Next Thread: Anyone know of a good tutorial for the GS-DOS embedded operating system?
Views: 1891 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Legacy and Other Languages





