Remove element at index from sequence
Asked Answered
L

1

6

I have a sequence and I want to remove an element from it at a certain index. How do I do this?

Libeler answered 2/1, 2016 at 16:48 Comment(0)
Q
6

You can use delete:

var
  a = @[1, 2, 3]

echo a
a.delete(1)  
echo a

Link: http://ideone.com/4IE3cI

@[1, 2, 3]
@[1, 3]
Quixote answered 2/1, 2016 at 17:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.