Skip to content

Commit

Permalink
Fix minor typos
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 499196219
  • Loading branch information
Googler authored and jgodbout committed Jan 3, 2023
1 parent 57b901f commit 43158d8
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -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"])
2 changes: 1 addition & 1 deletion koans-solved/atoms-vs-lists.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions koans-solved/basic-macros.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion koans-solved/functions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion koans-solved/hash-tables.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion koans-solved/nil-false-empty.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions koans-solved/structures.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))))
Expand Down
2 changes: 1 addition & 1 deletion koans/atoms-vs-lists.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions koans/basic-macros.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion koans/functions.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion koans/hash-tables.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion koans/nil-false-empty.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions koans/structures.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))))
Expand Down

0 comments on commit 43158d8

Please sign in to comment.