From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gene Newsgroups: gmane.emacs.help Subject: Re: Define skeleton from alist? Date: Wed, 13 Jul 2016 14:37:39 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1468446045 2715 80.91.229.3 (13 Jul 2016 21:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 21:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 13 23:40:38 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNRtW-0000a6-2N for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 23:40:38 +0200 Original-Received: from localhost ([::1]:50167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNRtN-00018I-5M for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 17:40:29 -0400 X-Received: by 10.13.203.68 with SMTP id n65mr8233413ywd.26.1468445860168; Wed, 13 Jul 2016 14:37:40 -0700 (PDT) X-Received: by 10.36.36.133 with SMTP id f127mr1102912ita.2.1468445860134; Wed, 13 Jul 2016 14:37:40 -0700 (PDT) Original-Path: usenet.stanford.edu!jk6no22358012igb.0!news-out.google.com!d130ni1993ith.0!nntp.google.com!hy1no1011666igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.255.103.23; posting-account=xePGxQoAAAAgJalA5zaHmrGIX9Wk_gLW Original-NNTP-Posting-Host: 67.255.103.23 User-Agent: G2/1.0 Injection-Date: Wed, 13 Jul 2016 21:37:40 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:218510 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110821 Archived-At: At first blush it seems as you might have an impoverished mental model arising from an attitude and/or worldview in which Iteration, state-retention (EG via assignment via `setq'), and strings dominate. Though `dolist' can iterate through a list, `mapcar' and its relatives can also access every element of a list. You can think of `mapcar' as a higher order function analogous to a hand; it can hold any number of functions in it's tool-using hand ... even an on-the-fly anonymous lambda function. When mapcar has a list element in it's hand the variants of c___r (with `car' and `cdr' qualifying as the simplest cases) can select subelements. Thus I present the following for your `eval'uation: (mapcar 'identity fountain-title-page-list) (mapcar (lambda (elt)(identity elt)) fountain-title-page-list) (mapcar (lambda (elt)(car elt)) fountain-title-page-list) (mapcar (lambda (elt)(cdr elt)) fountain-title-page-list) (mapcar (lambda (elt)(cons (car elt)(cdr elt))) fountain-title-page-list) I'm hoping that what you learn can be used along with `concat' and `skeleton-read' to accomplish your desires. Cheers! Gene