node-list-filter function

Subject: node-list-filter function
From: "Geoffrey E. Morris" <gemorris@xxxxxxxxxxxxxx>
Date: Sun, 8 Jun 1997 01:15:07 -0400
I think the implementation of the NODE-LIST-FILTER function shown in
paragraph 10.2.2 of the DSSSL spec is incorrect. The node list returned is
in reverse order as compared to the input node list. This can be corrected
by reversing the arguments to NODE-LIST:

(define (node-list-filter proc nl)
  (node-list-reduce nl
    (lambda (result snl)
      (if (proc snl)
        (node-list result snl) ;; append snl to result
        result))
    (empty-node-list)))

Which implementation was intended by the authors?

-- Geoff Morris


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread