I\'d like to make copies of my 2D array, which feels like the nice, functional, nondestructive way of handling arrays. What is the lispy way of doing this?
If you want to do things the nice, functional, nondestructive way
, then why do you even need to copy it?
if you're copying it in order to update it -- then you're not doing it the functional way.
if you're doing it the functional way -- then you don't need a copy. You can just pass it anywhere and everywhere.
Maybe you want to transform it. In that case, you could use one of Lisp's many pure functions, such as mapcar
or filter
.