; P20 Remove the K'th element from a list. (def a (list "a" "b" "c" "d")) (func enumerate (lst) (def ret (list)) (for-each lst (redef ret (append ret (list (+ 1 (length ret)) _item_)))) ret) (func extend (lst1 lst2) (reduce append lst2 lst1)) ; using slices (func remove-at-slice (lst idx) (extend (slice lst 1 (- idx 1)) (slice lst (+ idx 1)))) (print (->string a)) (print (->string (remove-at-slice a 2)))