EMA-XPS Online



syntax: (tree-substitute-if <new> <predicate>
             <tree>)                 ; Babylon Lisp
        (subst-if <new> <predicate>
             <tree>)                 ; Common Lisp

This function exchanges the elements, which have the
right predicate, against new ones. It does not only
work on the list <tree>, but it works too on all
lists, which are included in <tree>.

example:       >(tree-substitute-if 'c #'numberp
                                    '(a b 1 (1 b a)))
               (A B C (C B A))

EMA-XPS Online