Skip to content

Commit

Permalink
Adjust position of the blanks
Browse files Browse the repository at this point in the history
This way, the test framework can throw the correct errors for
this test as it only allows blanks to appear first.

Also, adjust the answer correspondingly.
  • Loading branch information
kaijchen committed Dec 18, 2020
1 parent 5d4cd12 commit e0e67be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions koans-solved/let.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
;; created: a symbol that names a variable becomes bound to a value.
(let ((x 10)
(y 20))
(assert-equal (+ x y) 30)
(assert-equal 30 (+ x y))
;; It is possible to shadow previously visible bindings.
(let ((y 30))
(assert-equal (+ x y) 40))
(assert-equal (+ x y) 30))
(assert-equal 40 (+ x y)))
(assert-equal 30 (+ x y)))
;; Variables bound by LET have a default value of NIL.
(let (x)
(assert-equal x nil)))
(assert-equal nil x)))

(define-test let-versus-let*
;; LET* is similar to LET, except the bindings are established sequentially,
Expand Down
8 changes: 4 additions & 4 deletions koans/let.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
;; created: a symbol that names a variable becomes bound to a value.
(let ((x 10)
(y 20))
(assert-equal (+ x y) ____)
(assert-equal ____ (+ x y))
;; It is possible to shadow previously visible bindings.
(let ((y 30))
(assert-equal (+ x y) ____))
(assert-equal (+ x y) ____))
(assert-equal ____ (+ x y)))
(assert-equal ____ (+ x y)))
;; Variables bound by LET have a default value of NIL.
(let (x)
(assert-equal x ____)))
(assert-equal ____ x)))

(define-test let-versus-let*
;; LET* is similar to LET, except the bindings are established sequentially,
Expand Down

0 comments on commit e0e67be

Please sign in to comment.