X-Git-Url: https://git.piment-noir.org/?p=TD_LISP.git;a=blobdiff_plain;f=lists.lsp;fp=lists.lsp;h=273dee0dfd8f0fcd0b4812f8509b74a2c2e12d9c;hp=432d9c7b80f8510e6e9aacdd2c7c4faea0889321;hb=35984aac4f19ed7ac56e441e0addc1df87a88c61;hpb=b610b3081e928e5b67a5b03704f899f0411ba317 diff --git a/lists.lsp b/lists.lsp index 432d9c7..273dee0 100755 --- a/lists.lsp +++ b/lists.lsp @@ -12,9 +12,9 @@ ;(println (last '())) (define (list-length a-list) - (if a-list - (+ 1 (list-length (rest a-list))) - 0)) + (if a-list + (+ 1 (list-length (rest a-list))) + 0)) (println (list-length L)) @@ -26,20 +26,20 @@ type list ::= empty-list | first * list (println (+ x 1)) (set 'x 1 'y 2) -(let ((x 3) (y 4)) - (println x) - (println (list x y))) +(let ((x 3) (y 4)) + (println x) + (println (list x y))) (println "x="x" y="y) (setq x 3 y 4) (let ((x 1) (y 2)) - (println "x="x" y="y)) + (println "x="x" y="y)) (println "x="x" y="y) (setq x 3 y 4) (let ((y 2)) - (setq x 5 y 6) - (println "x="x" y="y)) + (setq x 5 y 6) + (println "x="x" y="y)) (println "x="x" y="y) (exit)