From 605b56503fd09d6789b4ba97e1f0c804be7f5170 Mon Sep 17 00:00:00 2001 From: pfarwick-latacora <56267801+pfarwick-latacora@users.noreply.github.com> Date: Tue, 15 Jun 2021 16:48:17 -0500 Subject: [PATCH] Revert " List Clj is complete" --- src/koans/03_lists.clj | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/koans/03_lists.clj b/src/koans/03_lists.clj index d2917f7..dbdf6f5 100644 --- a/src/koans/03_lists.clj +++ b/src/koans/03_lists.clj @@ -3,43 +3,43 @@ (meditations "Lists can be expressed by function or a quoted form" - (= '(1 2 3 4 5) (list 1 2 3 4 5)) + (= '(__ __ __ __ __) (list 1 2 3 4 5)) "They are Clojure seqs (sequences), so they allow access to the first" - (= 1 (first '(1 2 3 4 5))) + (= __ (first '(1 2 3 4 5))) "As well as the rest" - (= '(2 3 4 5)(rest '(1 2 3 4 5))) + (= __ (rest '(1 2 3 4 5))) "Count your blessings" - (= 3 (count '(dracula dooku chocula))) + (= __ (count '(dracula dooku chocula))) "Before they are gone" - (= 0 (count '())) + (= __ (count '())) "The rest, when nothing is left, is empty" - (= () (rest '(100))) + (= __ (rest '(100))) "Construction by adding an element to the front is easy" - (= '(:a :b :c :d :e) (cons :a '(:b :c :d :e))) + (= __ (cons :a '(:b :c :d :e))) "Conjoining an element to a list isn't hard either" - (= '(:e :a :b :c :d) (conj '(:a :b :c :d) :e)) + (= __ (conj '(:a :b :c :d) :e)) "You can use a list like a stack to get the first element" - (= :a (peek '(:a :b :c :d :e))) + (= __ (peek '(:a :b :c :d :e))) "Or the others" - (= '(:b :c :d :e)(pop '(:a :b :c :d :e))) + (= __ (pop '(:a :b :c :d :e))) "But watch out if you try to pop nothing" - (= "No dice!" (try + (= __ (try (pop '()) (catch IllegalStateException e "No dice!"))) "The rest of nothing isn't so strict" - (= ()(try + (= __ (try (rest '()) (catch IllegalStateException e "No dice!"))))