0 Members and 2 Guests are viewing this topic.
Yes, in that situation i would use closing statments too.
(defun multi-subst-fun (lst-i) (eval (list 'defun 'multi-subst '(lst) (list 'mapcar (list 'function (list 'lambda '(a) (cons 'cond (reverse (cons '(t a) (mapcar '(lambda (a) (list (list 'equal (car a) 'a ) ;_ list (cadr a) ) ;_ list ) ;_ lambda lst-i ) ;_ mapcar ) ;_ cons ) ;_ reverse ) ;_ cons ) ;_ list ) ;_ list 'lst ) ;_ list ) ;_ list ) ;_ eval) ;_ defun;; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))
(defun multi-subst-fun (lst-i) (eval (list 'defun 'multi-subst '(lst) (list 'mapcar (list 'function (list 'lambda '(a) (cons 'cond (reverse (cons '(t a) (mapcar '(lambda (a) (list (list 'equal (car a) 'a) (cadr a))) lst-i)))))) 'lst))));; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))
Everything, at a forum, do not like comments.Very well!I shall format the code for a forum...
>ALLSelect...1Code: [Select](defun multi-subst-fun (lst-i)) ;_ defun;; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))OR 2Code: [Select](defun multi-subst-fun (lst-i);; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))
(defun multi-subst-fun (lst-i)) ;_ defun;; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))
(defun multi-subst-fun (lst-i);; do the test...(multi-subst-fun '((1 "a") (3 "b")))(multi-subst '(1 2 3 4 5))(multi-subst '(1 6 4 3 7))