Endomorphisms( group )  
Endomorphisms computes all the endomorphisms of the group group. 
This function is most essential for computing the near-rings on a group.
The endomorphisms are returned as a list of transformations s.t. 
the identity endomorphism is always the last entry in this list. For each  
transformation in this list the record component 
is-Group-En-do-mor-phism is
set to true and if such a transformation is in fact an automorphism 
then in
addition the record component 
is-Group-Auto-mor-phism is set to true.
  gap> g := Group( (1,2,3) );                                         
  Group( (1,2,3) )
  gap> Endomorphisms( g );
  [ Transformation( Group( (1,2,3) ), [ 1, 1, 1 ] ), 
    Transformation( Group( (1,2,3) ), [ 1, 3, 2 ] ), 
    Transformation( Group( (1,2,3) ), [ 1, 2, 3 ] ) ]
GAP 3.4.4