Aykut Caglayan
2008-02-02 19:44:35 UTC
(defun my-replace (lst)
(cond ((null lst) '())
((eq (car lst) 'a) (append (list 'e) (my-replace (cdr lst))))
((eq (car lst) 'b) (append (list 'd) (my-replace (cdr lst))))
(t (append (list (car lst)) (my-replace (cdr lst))))))
Bu sablonu L-sistem'i ya da bir fraktallik uygulamasina nasil cevirebilirim?
Yani (null lst) true dondugunde sona erdirilen dongu sonucu bize verilen yeni listeyi, istedigim kereler ayni muameleye tabi tutmak istiyorum.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
(cond ((null lst) '())
((eq (car lst) 'a) (append (list 'e) (my-replace (cdr lst))))
((eq (car lst) 'b) (append (list 'd) (my-replace (cdr lst))))
(t (append (list (car lst)) (my-replace (cdr lst))))))
Bu sablonu L-sistem'i ya da bir fraktallik uygulamasina nasil cevirebilirim?
Yani (null lst) true dondugunde sona erdirilen dongu sonucu bize verilen yeni listeyi, istedigim kereler ayni muameleye tabi tutmak istiyorum.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.