From 84c5757d099d8d9e81fce90683ac09f51d5d280e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20W=C3=B6gerbauer?= Date: Sun, 16 Oct 2022 20:17:27 +0200 Subject: [PATCH] Multiple typo fixes Corrected for some typos I found while working through the exercises. Both in "./koans" and "./koans-solved". --- koans-solved/backquote.lisp | 6 +++--- koans-solved/condition-handlers.lisp | 2 +- koans-solved/control-statements.lisp | 2 +- koans-solved/mapcar-and-reduce.lisp | 2 +- koans-solved/nil-false-empty.lisp | 2 +- koans/backquote.lisp | 6 +++--- koans/condition-handlers.lisp | 2 +- koans/control-statements.lisp | 2 +- koans/mapcar-and-reduce.lisp | 2 +- koans/nil-false-empty.lisp | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/koans-solved/backquote.lisp b/koans-solved/backquote.lisp index e1a187d3..fef6945e 100644 --- a/koans-solved/backquote.lisp +++ b/koans-solved/backquote.lisp @@ -26,7 +26,7 @@ ;; , unquotes a part of the expression. (assert-equal '((123) 45 6 z) `(,x 45 6 z)) (assert-equal '((123) 45 6 (7 8 9)) `(,x 45 6 ,z)) - ;; ,@ splices an expression into the into the list surrounding it. + ;; ,@ splices an expression into the list surrounding it. (assert-equal '((123) 45 6 7 8 9) `(,x 45 6 ,@z)) (assert-equal '(123 45 6 7 8 9) `(,@x 45 6 ,@z)))) @@ -34,7 +34,7 @@ ;; Because of its properties, backquote is useful for constructing Lisp forms ;; that are macroexpansions or parts of macroexpansions. (let ((variable 'x)) - ;; Fill in the blank without without using backquote/unquote notation. + ;; Fill in the blank without using backquote/unquote notation. (assert-equal '(if (typep x 'string) (format nil "The value of ~A is ~A" 'x x) (error 'type-error :datum x :expected-type 'string)) @@ -44,7 +44,7 @@ :expected-type 'string)))) (let ((error-type 'type-error) (error-arguments '(:datum x :expected-type 'string))) - ;; Fill in the blank without without using backquote/unquote notation. + ;; Fill in the blank without using backquote/unquote notation. (assert-equal '(if (typep x 'string) (format nil "The value of ~A is ~A" 'x x) (error 'type-error :datum x :expected-type 'string)) diff --git a/koans-solved/condition-handlers.lisp b/koans-solved/condition-handlers.lisp index 7d7bee16..36d5ef46 100644 --- a/koans-solved/condition-handlers.lisp +++ b/koans-solved/condition-handlers.lisp @@ -186,7 +186,7 @@ (assert-equal '(:my-error) *list*))) (define-test handler-case-type - ;; A handler cases is not executed if it does not match the condition type. + ;; A handler case is not executed if it does not match the condition type. (let ((*list* '())) (handler-case (signal (make-condition 'error)) (my-error (condition) (handle-my-error condition)) diff --git a/koans-solved/control-statements.lisp b/koans-solved/control-statements.lisp index 48b73a1a..1fe0acd3 100644 --- a/koans-solved/control-statements.lisp +++ b/koans-solved/control-statements.lisp @@ -16,7 +16,7 @@ ;; IF only evaluates and returns one branch of a conditional expression. (assert-equal :true (if t :true :false)) (assert-equal :false (if nil :true :false)) - ;; This also applies to side effects that migh or might not be evaluated. + ;; This also applies to side effects that might or might not be evaluated. (let ((result)) (if t (setf result :true) diff --git a/koans-solved/mapcar-and-reduce.lisp b/koans-solved/mapcar-and-reduce.lisp index 57743479..d05b542b 100644 --- a/koans-solved/mapcar-and-reduce.lisp +++ b/koans-solved/mapcar-and-reduce.lisp @@ -16,7 +16,7 @@ (define-test mapcar (let ((numbers '(1 2 3 4 5 6))) - ;; Inside MAPCAR, he function 1+ will be applied to each element of NUMBERS. + ;; Inside MAPCAR, the function 1+ will be applied to each element of NUMBERS. ;; A new list will be collected from the results. (assert-equal '(2 3 4 5 6 7) (mapcar #'1+ numbers)) (assert-equal '(-1 -2 -3 -4 -5 -6) (mapcar #'- numbers)) diff --git a/koans-solved/nil-false-empty.lisp b/koans-solved/nil-false-empty.lisp index ebbd6ebd..e8322115 100644 --- a/koans-solved/nil-false-empty.lisp +++ b/koans-solved/nil-false-empty.lisp @@ -46,7 +46,7 @@ (define-test or ;; The logical operator OR can also take multiple arguments. - (true-or-false? t (or nil nil nil t nil)) + (true-or-false? t (or nil nil nil t nil)) ;; OR returns the first non-NIL value it encounters, or NIL if there are none. (assert-equal nil (or nil nil nil)) (assert-equal 1 (or 1 2 3 4 5))) diff --git a/koans/backquote.lisp b/koans/backquote.lisp index c66deba1..1304cae8 100644 --- a/koans/backquote.lisp +++ b/koans/backquote.lisp @@ -26,7 +26,7 @@ ;; , unquotes a part of the expression. (assert-equal ____ `(,x 45 6 z)) (assert-equal ____ `(,x 45 6 ,z)) - ;; ,@ splices an expression into the into the list surrounding it. + ;; ,@ splices an expression into the list surrounding it. (assert-equal ____ `(,x 45 6 ,@z)) (assert-equal ____ `(,@x 45 6 ,@z)))) @@ -34,7 +34,7 @@ ;; Because of its properties, backquote is useful for constructing Lisp forms ;; that are macroexpansions or parts of macroexpansions. (let ((variable 'x)) - ;; Fill in the blank without without using backquote/unquote notation. + ;; Fill in the blank without using backquote/unquote notation. (assert-equal ____ `(if (typep ,variable 'string) (format nil "The value of ~A is ~A" ',variable ,variable) @@ -42,7 +42,7 @@ :expected-type 'string)))) (let ((error-type 'type-error) (error-arguments '(:datum x :expected-type 'string))) - ;; Fill in the blank without without using backquote/unquote notation. + ;; Fill in the blank without using backquote/unquote notation. (assert-equal ____ `(if (typep x 'string) (format nil "The value of ~A is ~A" 'x x) diff --git a/koans/condition-handlers.lisp b/koans/condition-handlers.lisp index c18d1d6a..90208a10 100644 --- a/koans/condition-handlers.lisp +++ b/koans/condition-handlers.lisp @@ -172,7 +172,7 @@ (assert-equal ____ *list*))) (define-test handler-case-type - ;; A handler cases is not executed if it does not match the condition type. + ;; A handler case is not executed if it does not match the condition type. (let ((*list* '())) (handler-case (signal (make-condition 'error)) (my-error (condition) (handle-my-error condition)) diff --git a/koans/control-statements.lisp b/koans/control-statements.lisp index 13ba43b4..93489b1a 100644 --- a/koans/control-statements.lisp +++ b/koans/control-statements.lisp @@ -16,7 +16,7 @@ ;; IF only evaluates and returns one branch of a conditional expression. (assert-equal ____ (if t :true :false)) (assert-equal ____ (if nil :true :false)) - ;; This also applies to side effects that migh or might not be evaluated. + ;; This also applies to side effects that might or might not be evaluated. (let ((result)) (if t (setf result :true) diff --git a/koans/mapcar-and-reduce.lisp b/koans/mapcar-and-reduce.lisp index 76dfa830..2298a2a2 100644 --- a/koans/mapcar-and-reduce.lisp +++ b/koans/mapcar-and-reduce.lisp @@ -16,7 +16,7 @@ (define-test mapcar (let ((numbers '(1 2 3 4 5 6))) - ;; Inside MAPCAR, he function 1+ will be applied to each element of NUMBERS. + ;; Inside MAPCAR, the function 1+ will be applied to each element of NUMBERS. ;; A new list will be collected from the results. (assert-equal '(2 3 4 5 6 7) (mapcar #'1+ numbers)) (assert-equal ____ (mapcar #'- numbers)) diff --git a/koans/nil-false-empty.lisp b/koans/nil-false-empty.lisp index 6d4dd412..90c2cb77 100644 --- a/koans/nil-false-empty.lisp +++ b/koans/nil-false-empty.lisp @@ -46,7 +46,7 @@ (define-test or ;; The logical operator OR can also take multiple arguments. - (true-or-false? ____ (or nil nil nil t nil)) + (true-or-false? ____ (or nil nil nil t nil)) ;; OR returns the first non-NIL value it encounters, or NIL if there are none. (assert-equal ____ (or nil nil nil)) (assert-equal ____ (or 1 2 3 4 5)))