From: Lennart Borgman <lennart.borgman@gmail.com>
To: Nordlöw <per.nordlow@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Wanted: mapcar() without nils
Date: Sat, 13 Jun 2009 21:43:28 +0200 [thread overview]
Message-ID: <e01d8a50906131243w1af3c85cg4ab868f4d5dc1542@mail.gmail.com> (raw)
In-Reply-To: <65652541-cb7d-4c93-8baf-cd963990e57e@g1g2000yqh.googlegroups.com>
You misplaced a closing paren in the lambda
On Sat, Jun 13, 2009 at 8:24 PM, Nordlöw<per.nordlow@gmail.com> wrote:
> (defun extract-elements (pred seq)
> "Extract a copy of SEQ containing all elements fullfilling
> PRED."
> (delq nil (mapcar `(lambda (elm) (when (,pred elm)) elm) seq)))
(delq nil (mapcar `(lambda (elm) (when (,pred elm) elm)) seq)))
> ;; Use: (extract-elements 'symbolp '(a b 1 2)) => '(a b)
> ;; Use: (extract-elements 'numberp '(a b 1 2)) => '(1 2)
next prev parent reply other threads:[~2009-06-13 19:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 12:19 Wanted: mapcar() without nils Nordlöw
2009-06-13 12:47 ` Lennart Borgman
[not found] ` <mailman.562.1244897231.2239.help-gnu-emacs@gnu.org>
2009-06-13 18:24 ` Nordlöw
2009-06-13 19:05 ` Thierry Volpiatto
[not found] ` <mailman.581.1244920367.2239.help-gnu-emacs@gnu.org>
2009-06-13 19:33 ` Nordlöw
2009-06-13 19:45 ` Nordlöw
2009-06-13 19:43 ` Lennart Borgman [this message]
2009-06-13 20:02 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e01d8a50906131243w1af3c85cg4ab868f4d5dc1542@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=per.nordlow@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).