Improvement: Command to remove n-th element of list
Hi developers,
I'm wondering why there isn't a command in GeoGebra to remove the n-th element of a list. This is really annyoing!
A few years ago, Michael Borcherds postet a workaround that only workes for number lists but not for string lists or arbitrary lists (e.g. a list of lists). Additionally, Michaels solution has to be blown up even more if the length of the list is not known previously.
Other workarounds like take the sublist before the position and take the sublist after the position and then joining the sublists are also quite ugly if you want to delete several elements one after another.
Therefore, I desperately suggest to add an overloaded second syntax to the Remove Command:
Remove( <List>, <Index>)
Removes the object an the given index from the given list
Example: Remove({4,5,6,7},2) yields list {4,6,7}.
I really don't understand why this plausible command isn't implemented yet. Please approve.
Alex
Until (maybe) your suggestion is implemented, you can use the following remedy in the meantime:
(not as elegant as those of Michael Borcherds, but also for strings or lists and unknown lists length)
Zip(<listeINP>(n), n, (1…Länge(listeINP)) \ {<deleteIndex>, ......})
or for your example:
But maybe there are even better variants.
una pregunta
en el comando Zip(l1(n),n,(1...Länge(l1))\{2}) hay tres puntos ...
yo siempre he usado dos puntos ..
hay una sintaxis correcta que no falle nunca o es indiferente?
PD: tambien es posible crear una herramienta personal para este comando
2 points est accepté, mais transformé d'office en 3 points
valide 1..5 puis regarde la définition de la liste créée, tu liras 1...5
merci
Comments have been locked on this page!