feat: add Array.update_nth!

This commit is contained in:
Shunsuke Shibayama 2023-08-28 15:33:58 +09:00
parent 07e37c878c
commit 74bca70017
7 changed files with 87 additions and 15 deletions

View file

@ -69,3 +69,6 @@ class Array(list):
if not contains_operator(elem_t, elem):
return False
return True
def update_nth(self, index, f):
self[index] = f(self[index])