From: Jérôme Benoit Date: Mon, 24 Apr 2017 13:28:16 +0000 (+0200) Subject: Properly indent some code path X-Git-Url: https://git.piment-noir.org/?p=TD_LISP.git;a=commitdiff_plain;h=35984aac4f19ed7ac56e441e0addc1df87a88c61 Properly indent some code path Signed-off-by: Jérôme Benoit --- diff --git a/introduction.lsp b/introduction.lsp index 7e6a7c8..1fe639d 100755 --- a/introduction.lsp +++ b/introduction.lsp @@ -15,6 +15,8 @@ (println hello) (println world) +(println 'hello) +(println 'world) (println (eval 'z)) 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)