help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

list conversion


From: Z. Huang
Subject: list conversion
Date: 06 May 2003 15:46:49 -0400

Given a list ("first" "second" "third"). I'd to convert it to a 
a new list: 
   (("" . "first")
    ("" . "second")
    ("" . "third"))     

The following lisp code was intended for this purpose, but not working. It
looks that I missed some very basic stuff (I rarely code in lisp). Can
anyone point out what is wrong? Thanks in advance. 

(defun list-conversion (arg)
  (let ((l arg) (new-list ()))
    (while l
      (append new-list (list "" . (car l))))
      (setq l (cdr l))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]