Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Duplicate list elements recursively
;gnu clisp 2.49.60 (defun dupl (lst) (cond ((null lst) nil) ((not (listp lst)) (list lst lst)) (t (cons (car lst) (cons (car lst) (dupl (cdr lst))))) ) ) (print (dupl '(1 2 3))) ;; (1 1 2 2 3 3) (print (dupl '(r (5)))) ;; (R R (5) (5))
run
|
edit
|
history
|
help
1
lab1_var2
a
CMSC 257 Revised Assignment 4
liste-recursiv
summ list
Factorial in Lisp using loop for
Q1True
S17016281_ACTIVIDAD_19
removing null elements from the structure list
homework.lisp