Subject: bug#19469: closed (Re: bug#19469: minor nit: (sxml xpath) node-typeof?)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 22 Jun 2016 20:42:02 +0000

Your bug report

#19469: minor nit: (sxml xpath) node-typeof?

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19469: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19469
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19469: minor nit: (sxml xpath) node-typeof?
From: Andy Wingo <[email-masked]>
To: Matt Wette <[email-masked]>
Cc: [email-masked]
Date: Wed, 22 Jun 2016 22:41:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On Tue 09 Feb 2016 04:58, Matt Wette <[email-masked]> writes:

> I recommend that this bug be closed.  The current code is fine and consistent with the rest of the module. — Matt

OK :)  Patches accepted if there are improvements to make :)

A

Subject: minor nit: (sxml xpath) node-typeof?
From: Matt Wette <[email-masked]>
To: [email-masked]
Date: Mon, 29 Dec 2014 17:57:35 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

In guile-2.0.11 the following appears in sxml/xpath.scm:

(define (node-typeof? crit)
  (lambda (node)
    (case crit
      ((*) (and (pair? node) (not (memq (car node) '(@ *PI*)))))
      ((*any*) #t)
      ((*text*) (string? node))
      (else
       (and (pair? node) (eq? crit (car node))))
)))

Would it be more efficient to swap the "(lambda (node)" and "(case crit" forms?

Matt