gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
20 stars 5 forks source link

[list operator] `container[] >>- indices` removes first occurrences of elements in indices rather than indices #166

Closed villerd closed 4 months ago

villerd commented 5 months ago

Describe the bug The documentation states "To remove all the indexes contained in another container, use container[] >>- indices; (classic form: remove key: indices all: true from: container;)". However, this removes from container the first occurrences of the elements in indices, rather than removing elements from container at the indices contained in indices.

To Reproduce Steps to reproduce the behavior:

  1. Go to Library models > GAML Syntax > Data Types And Structures > Lists
  2. Click on Experiment Lists > modifying_lists
  3. Scroll down to After l1[] >>- [1,2,4]
  4. See error

Expected behavior elements of indices 1, 2, 4 are expected to be removed from l1, rather first occurrences of "1", "2" and "4" are removed from l1.

Desktop (please complete the following information):