Add unit tests for lib.functions.remove-at-indices

This commit is contained in:
2025-02-21 14:06:05 +00:00
parent 1edd618b42
commit 7c64d23b0a
2 changed files with 21 additions and 2 deletions

View File

@@ -55,8 +55,8 @@ where key x in A has associations {y in LST : INDICATOR(y) = x}."
"Given string INP, attempt to parse an integer. Return NIL otherwise."
(parse-integer inp :junk-allowed t))
(fn remove-at-indices (indices lst) (-> (list list) list)
(fn remove-at-indices (indices lst) (-> (list sequence) list)
(loop :for i :from 0 :to (1- (length lst))
:for item :in lst
:for item :in (coerce lst 'list)
:if (not (member i indices))
:collect item))