; P16 Drop every N'th element from a list. (def a (list "a" "b" "c" "d" "e" "f" "g" "h" "i" "k")) (func drop-n (lst n) (drop-n lst n (list) n)) (func drop-n (lst :nil n acc idx) acc) (func drop-n (lst :{:any} n acc idx) (if (eq? 1 idx) (drop-n (rest lst) n acc n) ; reset n, don't add to acc (drop-n (rest lst) n (append acc (first lst)) (-- idx)))) (func -- (num) (- num 1)) (print (->string a)) (print (->string (drop-n a 3)))