www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_221.html   search  
 
Buy the book!


Programming in Emacs Lisp

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.7.1 The append Function

The append function attaches one list to another. Thus,

 
(append '(1 2 3 4) '(5 6 7 8))

produces the list

 
(1 2 3 4 5 6 7 8)

This is exactly how we want to attach two lengths' lists produced by lengths-list-file to each other. The results contrast with cons,

 
(cons '(1 2 3 4) '(5 6 7 8))

which constructs a new list in which the first argument to cons becomes the first element of the new list:

 
((1 2 3 4) 5 6 7 8)


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003