Search                        Top                                  Index
HELP COPYTREE                            updated Mark Rubinstein  October 1985

    copytree(list) -> list

This makes a copy of a list, with all the elements which are themselves lists
recursively copied. If the list is dynamic, it will be fully expanded first.

COPYTREE could be defined this:

    define copytree(tree);
        ;;; recursively copy a list structure
        if atom(tree) then
            tree
        else
            conspair(copytree(hd(tree)), copytree(tl(tree)))
        endif;
    enddefine;


See also HELP * COPY, * COPYLIST, * COPYDATA

--- C.all/help/copytree
--- Copyright University of Sussex 1990. All rights reserved. ----------