79838289

Date: 2025-12-04 19:35:12
Score: 1
Natty:
Report link

The following complements @Svante's answer, by taking into account nested lists.

(defun nested-list-to-ps (lst)
  (if (listp lst)
      `(ps:array ,@(mapcar #'nested-list-to-ps lst))
      lst))

(defun example () '(1 (2 3) (4 (5 6))))
(ps:ps (ps:lisp (nested-list-to-ps (example))))
; => "[1, [2, 3], [4, [5, 6]]];"
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Svante's
  • Low reputation (0.5):
Posted by: aadcg