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

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

Re: empty-line-p


From: Barry Margolin
Subject: Re: empty-line-p
Date: Fri, 30 Mar 2007 01:46:53 -0400
User-agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X)

In article <jwv648j70t5.fsf-monnier+gnu.emacs.help@gnu.org>,
 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> >  (if (looking-at "^[ \t\f\r]*$")
> >      t
> >    nil)))
> 
>   (if <foo> t nil)
> 
> is an eta-regexp, which can be advantageously reduced to just <foo>.
> 
> 
>         Stefan
> 
> 
> PS: The classical eta-regexp is (lambda (x) (<foo> x)), which is equivalent to
> just <foo>.  Another variant is (cons (car <foo>) (cdr <foo>)), which
> eta-reduces to just <foo>.

That last one is different, because the new cons is not eq to the 
original <foo>.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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