GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<?xml version="1.0" encoding="UTF-8"?>12<!-- This is an automatically generated file. -->3<Chapter Label="Chapter_Trees">4<Heading>Trees</Heading>56The trees are used in ToDoLists.7They are a technical feature, and fairly general, so they also can be used somewhere else.8<Section Label="Chapter_Trees_Section_Trees">9<Heading>Trees</Heading>1011<ManSection>12<Filt Arg="arg" Name="IsTree" Label="for IsObject"/>13<Returns><C>true</C> or <C>false</C>14</Returns>15<Description>16The category of trees. A tree may have a content, a list of successors,17a predecessor and it knows if it is a leave of a tree or not.18</Description>19</ManSection>202122<ManSection>23<Attr Arg="arg" Name="Content" Label="for IsTree"/>24<Returns>object25</Returns>26<Description>27The content of the tree.28May be any object.29</Description>30</ManSection>313233<ManSection>34<Oper Arg="arg" Name="ListOfSuccessors" Label="for IsTree"/>35<Returns>a list of trees36</Returns>37<Description>38Returns the list of successors of a tree.39</Description>40</ManSection>414243<ManSection>44<Oper Arg="arg" Name="Predecessor" Label="for IsTree"/>45<Returns>a tree or fail46</Returns>47<Description>48Returns the predecessor of a tree, or fail if there is none.49</Description>50</ManSection>515253<ManSection>54<Oper Arg="arg" Name="ListOfSentinels" Label="for IsTree"/>55<Returns>a list56</Returns>57<Description>58Returns a list of leaves of the tree.59</Description>60</ManSection>616263<ManSection>64<Oper Arg="arg" Name="RemoveHead" Label="for IsTree"/>65<Returns>a tree66</Returns>67<Description>68Returns the first successor of the tree, and adds all other successors of the69tree to the tree that is returned.70If the tree is a leave, it returns an empty tree.71If the tree is empty, it returns the tree itself.72</Description>73</ManSection>747576<ManSection>77<Oper Arg="" Name="Tree" />78<Returns>a tree79</Returns>80<Description>81Returns an empty tree.82</Description>83</ManSection>848586<ManSection>87<Oper Arg="obj" Name="Tree" Label="for IsObject"/>88<Returns>a tree89</Returns>90<Description>91Returns a tree with argument <A>obj</A>.92</Description>93</ManSection>949596<ManSection>97<Oper Arg="tree,new_tree" Name="Add" Label="for IsTree, IsTree"/>98<Returns>nothing99</Returns>100<Description>101Adds the [list of] tree[s] <A>new_tree</A> as successor to the tree <A>tree</A>.102</Description>103</ManSection>104105106<ManSection>107<Oper Arg="sent" Name="ContentListFromSentinelToHead" Label="for IsTree"/>108<Returns>a list109</Returns>110<Description>111Returns a list of the contents of the trees from the leave <A>sent</A>112up to the content of the head of the tree.113</Description>114</ManSection>115116117<ManSection>118<Oper Arg="arg" Name="PostOrder" Label="for IsTree"/>119<Returns>a list120</Returns>121<Description>122Returns the contents of the nodes of the tree in post-order.123</Description>124</ManSection>125126127</Section>128129130</Chapter>131132133134