Earlier quoted context omitted.
> map / filter over list is different from arrays. How? CL-USER> (remove-if-not #'evenp '(1 2 3 4 5)) (2 4) CL-USER> (remove-if-not #'evenp #(1 2 3 4 5)) #(2 4) CL-USER> (loop for x in '(1 2 3 4 5) when (evenp x) do (format t "~&~a~%" x)) 2 4 NIL CL-USER> (loop for x across #(1 2 3 4 5) when (evenp x) do (format t "~&~a~%" x)) 2 4 NIL Even a function like: (defun print-evens (sequence) (loop for i below (length seque…
In non lisp languages, the mutable array often came without map / filter, weren't generic, didn't have lambdas so you end up writing imperative loops and potentially mutating elements in place because it's tempting; changing the paradigm right away
What languages do you know that have map and filter for lists, but not for arrays? Lisp has them for both, C++ has them for both, Java has them for both; Java didn't used to have lambdas or map, but it had standard lists long before it got either of them. Several decades before Java existed, Lisp had mutable arrays with map and filter. Supporting higher order functions has nothing at all to do with arrays vs lists.
> didn't have lambdas so you end up writing imperative loops
Lisp does have lambdas and imperative loops are still extremely common in Lisp code.