CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418386
###############################################################################
##
#F MakeMutableCopyListPPP.gi  The SymbCompCC package    D�rte Feichtenschlager
##

###############################################################################
##
#M MakeMutableCopyListPPP( list )
##
## Input: a list
##
## Output: a mutable copy of list
##
InstallMethod( MakeMutableCopyListPPP, [IsList], 
   function( list )
      local i, new_list;

      ## initialize
      new_list := [];

      ## copy recursively
      for i in [1..Length( list )] do
         if IsList( list[i] ) then 
            new_list[i] := MakeMutableCopyListPPP( list[i] );
         else new_list[i] := list[i];
         fi;
      od;

      return new_list;
   end);

#E MakeMutableCopyListPPP.gi . . . . . . . . . . . . . . . . . . . .  ends here