Code: Select all
(find-all "12" "12345" (replace "1" (copy $0) "N"))
"ERR: symbol is protected : $0"
Is here a way to make this construction to work, or I`ll have to change my code somehow to avoid $0/$it symbols?
Code: Select all
(find-all "12" "12345" (replace "1" (copy $0) "N"))
Code: Select all
newLISP v.10.2.8 on OSX IPv4 UTF-8, execute 'newlisp -h' for more info.
> (define (change x) (replace "1" x "N"))
(lambda (x) (replace "1" x "N"))
> (find-all "12" "12345" (change $0))
("N2")
Code: Select all
> (find-all "12" "12345" ((lambda (x) (replace "1" x "N")) $0))
("N2")