Hello there.

I seem to be having problems wrapping my head around how to use the ranges in the context of containers in phobos. Specifically, I can't seem to figure out how to remove an element from a linked list.

         foreach(cell; organism)
         {
            if(cell.x == x && cell.y == y)
            {
               organism.stableLinearRemove(cell);
               break;
            }
         }

mind.d(123): Error: function std.container.SList!(Cell).SList.linearRemove (Range r) is not callable using argument types (Cell) mind.d(123): Error: cannot implicitly convert expression (cell) of type cell.Cell to Take!(Range)

I somehow get the feeling such a basic operation should just...work?

/Max

Reply via email to