diff --git a/BUILD b/BUILD index bf87c5f..f70fc4d 100644 --- a/BUILD +++ b/BUILD @@ -1,5 +1,5 @@ # Description: Common Lisp lisp-koans -licenses(["notice"]) # Apache License 2.0 at //third_party/lisp/lisp-koans/LICENSE +licenses(["notice"]) exports_files(["LICENSE"]) diff --git a/koans-solved/atoms-vs-lists.lisp b/koans-solved/atoms-vs-lists.lisp index ef1c2fe..0fa78cf 100644 --- a/koans-solved/atoms-vs-lists.lisp +++ b/koans-solved/atoms-vs-lists.lisp @@ -12,7 +12,7 @@ ;;; See the License for the specific language governing permissions and ;;; limitations under the License. -;;; Lists in lisp are forms beginning and ending with rounded parentheses. +;;; Lists in Lisp are forms beginning and ending with rounded parentheses. ;;; Atoms are symbols, numbers, or other forms usually separated by whitespace ;;; or parentheses. diff --git a/koans-solved/basic-macros.lisp b/koans-solved/basic-macros.lisp index dc6caba..36c8ccb 100644 --- a/koans-solved/basic-macros.lisp +++ b/koans-solved/basic-macros.lisp @@ -54,7 +54,7 @@ (defun match-special-cases (thing) ;; T or OTHERWISE passed as the key matches any value. ;; NIL passed as the key matches no values. - ;; These symbols need to passed in parentheses. + ;; These symbols need to be passed in parentheses. (case thing ((t) :found-a-t) ((nil) :found-a-nil) @@ -85,8 +85,8 @@ ;; So far, we have been comparing objects using EQUAL, one of the Lisp ;; comparison functions. CASE compares the keys using EQL, which is distinct ;; from EQUAL. - ;; EQL is suitable for comparing numbers, characters, and objects for whom we - ;; want to check verify they are the same object. + ;; EQL is suitable for comparing numbers, characters, and objects when we + ;; want to verify they are the same object. (let* ((string "A string") (string-copy (copy-seq string))) ;; The above means that two distinct strings will not be the same under EQL, diff --git a/koans-solved/functions.lisp b/koans-solved/functions.lisp index 2b757aa..588600d 100644 --- a/koans-solved/functions.lisp +++ b/koans-solved/functions.lisp @@ -132,7 +132,7 @@ (defun make-adder (x) ;; MAKE-ADDER will create a function that closes over the parameter X. ;; The parameter will be remembered as a part of the environment of the - ;; returned function, which will continue refering to it. + ;; returned function, which will continue referring to it. (lambda (y) (+ x y))) (define-test lexical-closures diff --git a/koans-solved/hash-tables.lisp b/koans-solved/hash-tables.lisp index febaaec..4e425ec 100644 --- a/koans-solved/hash-tables.lisp +++ b/koans-solved/hash-tables.lisp @@ -69,7 +69,7 @@ (define-test hash-table-equality ;; EQUALP considers two hash tables to be equal if they have the same test and - ;; if its key-value pairs are the same under that test. + ;; if their key-value pairs are the same under that test. (let ((hash-table-1 (make-hash-table :test #'equal)) (hash-table-2 (make-hash-table :test #'equal))) (setf (gethash "one" hash-table-1) "yat") diff --git a/koans-solved/nil-false-empty.lisp b/koans-solved/nil-false-empty.lisp index e832211..cf34dd8 100644 --- a/koans-solved/nil-false-empty.lisp +++ b/koans-solved/nil-false-empty.lisp @@ -23,7 +23,7 @@ (true-or-false? t (not '()))) (define-test in-lisp-many-things-are-true - ;; In Common Lisp, the canonical values for truth is T. + ;; In Common Lisp, the canonical value for truth is T. ;; However, everything that is non-NIL is true, too. (true-or-false? t 5) (true-or-false? nil (not 5)) diff --git a/koans-solved/structures.lisp b/koans-solved/structures.lisp index 362eddb..ab19b95 100644 --- a/koans-solved/structures.lisp +++ b/koans-solved/structures.lisp @@ -92,7 +92,7 @@ :name "Manning" :team (list "Colts" "Broncos")))) ;; MANNING-1 and MANNING-2 are different objects... (true-or-false? nil (eq manning-1 manning-2)) - ;;...but they contain the same information. + ;; ...but they contain the same information. (true-or-false? t (equalp manning-1 manning-2)) (let ((manning-3 (copy-american-football-player manning-1))) (true-or-false? nil (eq manning-1 manning-3)) @@ -103,7 +103,7 @@ (nfl-guy-name manning-3))) (assert-equal "Rogers" (nfl-guy-name manning-1)) (assert-equal "Manning" (nfl-guy-name manning-3)) - ;; ...but modifying shared structure may affect other instances. + ;; ... but modifying shared structure may affect other instances. (setf (car (nfl-guy-team manning-1)) "Giants") (true-or-false? t (string= (car (nfl-guy-team manning-1)) (car (nfl-guy-team manning-3)))) diff --git a/koans/atoms-vs-lists.lisp b/koans/atoms-vs-lists.lisp index 62de29f..fc0c7a4 100644 --- a/koans/atoms-vs-lists.lisp +++ b/koans/atoms-vs-lists.lisp @@ -12,7 +12,7 @@ ;;; See the License for the specific language governing permissions and ;;; limitations under the License. -;;; Lists in lisp are forms beginning and ending with rounded parentheses. +;;; Lists in Lisp are forms beginning and ending with rounded parentheses. ;;; Atoms are symbols, numbers, or other forms usually separated by whitespace ;;; or parentheses. diff --git a/koans/basic-macros.lisp b/koans/basic-macros.lisp index d5b14c9..5ceb643 100644 --- a/koans/basic-macros.lisp +++ b/koans/basic-macros.lisp @@ -54,7 +54,7 @@ (defun match-special-cases (thing) ;; T or OTHERWISE passed as the key matches any value. ;; NIL passed as the key matches no values. - ;; These symbols need to passed in parentheses. + ;; These symbols need to be passed in parentheses. (case thing (____ :found-a-t) (____ :found-a-nil) @@ -85,8 +85,8 @@ ;; So far, we have been comparing objects using EQUAL, one of the Lisp ;; comparison functions. CASE compares the keys using EQL, which is distinct ;; from EQUAL. - ;; EQL is suitable for comparing numbers, characters, and objects for whom we - ;; want to check verify they are the same object. + ;; EQL is suitable for comparing numbers, characters, and objects when we + ;; want to verify they are the same object. (let* ((string "A string") (string-copy (copy-seq string))) ;; The above means that two distinct strings will not be the same under EQL, diff --git a/koans/functions.lisp b/koans/functions.lisp index cf67ffc..789cd93 100644 --- a/koans/functions.lisp +++ b/koans/functions.lisp @@ -128,7 +128,7 @@ (defun make-adder (x) ;; MAKE-ADDER will create a function that closes over the parameter X. ;; The parameter will be remembered as a part of the environment of the - ;; returned function, which will continue refering to it. + ;; returned function, which will continue referring to it. (lambda (y) (+ x y))) (define-test lexical-closures diff --git a/koans/hash-tables.lisp b/koans/hash-tables.lisp index 35ffb5e..ce7763e 100644 --- a/koans/hash-tables.lisp +++ b/koans/hash-tables.lisp @@ -69,7 +69,7 @@ (define-test hash-table-equality ;; EQUALP considers two hash tables to be equal if they have the same test and - ;; if its key-value pairs are the same under that test. + ;; if their key-value pairs are the same under that test. (let ((hash-table-1 (make-hash-table :test #'equal)) (hash-table-2 (make-hash-table :test #'equal))) (setf (gethash "one" hash-table-1) "yat") diff --git a/koans/nil-false-empty.lisp b/koans/nil-false-empty.lisp index 90c2cb7..e5677de 100644 --- a/koans/nil-false-empty.lisp +++ b/koans/nil-false-empty.lisp @@ -23,7 +23,7 @@ (true-or-false? ____ (not '()))) (define-test in-lisp-many-things-are-true - ;; In Common Lisp, the canonical values for truth is T. + ;; In Common Lisp, the canonical value for truth is T. ;; However, everything that is non-NIL is true, too. (true-or-false? ____ 5) (true-or-false? ____ (not 5)) diff --git a/koans/structures.lisp b/koans/structures.lisp index 42f88ef..5ac3782 100644 --- a/koans/structures.lisp +++ b/koans/structures.lisp @@ -92,7 +92,7 @@ :name "Manning" :team (list "Colts" "Broncos")))) ;; MANNING-1 and MANNING-2 are different objects... (true-or-false? ____ (eq manning-1 manning-2)) - ;;...but they contain the same information. + ;; ... but they contain the same information. (true-or-false? ____ (equalp manning-1 manning-2)) (let ((manning-3 (copy-american-football-player manning-1))) (true-or-false? ____ (eq manning-1 manning-3)) @@ -103,7 +103,7 @@ (nfl-guy-name manning-3))) (assert-equal ____ (nfl-guy-name manning-1)) (assert-equal ____ (nfl-guy-name manning-3)) - ;; ...but modifying shared structure may affect other instances. + ;; ... but modifying shared structure may affect other instances. (setf (car (nfl-guy-team manning-1)) "Giants") (true-or-false? ____ (string= (car (nfl-guy-team manning-1)) (car (nfl-guy-team manning-3))))