Hello Mariano,

thanks for the hint with 'Flat'. It seems I overlooked it.

But 'Flat' is still different to 'Flatten'.
'Flat()' applied to a list returns a complete flat list while
'Flatten()' only flattens the list a bit:

Applying 'Flat' to  [ 2,[ 3,[4] ] ]  results in [ 2, 3, 4 ],
 while 'Flatten' would return  [ 2,  3, [4]  ]


Best,


Jakob



Am 30.05.2012 20:53, schrieb Mariano Suarez-Alvarez:
On Wed, 30 May 2012, kroeker wrote:

Dear GAP-team,


recently I extensively used polynomials, lists and methods to manipulate them. From this experience I would like to suggest to add some of the following manipulation and access methods to the GAP-core:


[snip]

- flatten a list
( e.g. Flatten( [ 2,[ 3,[4] ] ] ) => [ 2, 3, [4] ] ; Flatten( [ 2, 3, [4] ] ) => [ 2, 3, 4 ] );


Isn't this precisely what the function Flat does?
(The naming scheme for functions is sometimes surprising, going from verbs to adjectives to nouns... I hope in some parallel universe GAP has a better naming convention :) )

-- m




_______________________________________________
Forum mailing list
Forum@mail.gap-system.org
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to