[ prog / sol / mona ]

prog


Lisp beginner thread

96 2021-03-14 13:11

>>90

(de num-do "Any"
   (let "translate"
      '(("Any")
         (recur ("Any")
            (cond
               ((lst? "Any")
                  (cons
                     (if (num? (car "Any"))
                        (lit
                           (list "Prg"
                              (list 'do (lit (car "Any")) '(run "Prg")) ) )
                        (car "Any") )
                     (mapcar recurse (cdr "Any")) ) )
               (T "Any") ) ) )
      (run (mapcar "translate" "Any")) ) )
: (num-do (3 (3 (prin "* ")) (prinl)))
* * *
* * *
* * *
-> NIL
132


VIP:

do not edit these