[Top][All Lists]

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

Re: empty-line-p

From: Stefan Monnier
Subject: Re: empty-line-p
Date: Fri, 30 Mar 2007 01:36:00 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

>  (if (looking-at "^[ \t\f\r]*$")
>      t
>    nil)))

  (if <foo> t nil)

is an eta-regexp, which can be advantageously reduced to just <foo>.


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>.

reply via email to

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