Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create a list in LISP and accepting elements of list from user?

Tags:

list

lisp

how to create a list in LISP and accepting elements of list from user?

like image 775
rohini Avatar asked Apr 08 '10 11:04

rohini


1 Answers

Use the read function to read user input. For example:

[6]> (list (read) (read))
joe
moe
(JOE MOE)

joe and moe are my input lines, terminated by a newline (pressing Enter). The list function creates a new list.

like image 120
Eli Bendersky Avatar answered Oct 23 '22 05:10

Eli Bendersky