Skip to content

Commit

Permalink
Renamed last-element to last.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Rahkola committed Oct 21, 2012
1 parent f1c6017 commit 9a7e303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/recursion.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(defn singleton? [coll]
:-)

(defn last-element [coll]
(defn my-last [coll]
:-)

(defn my-filter [f a-seq]
Expand Down
8 changes: 4 additions & 4 deletions test/recursion_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
(singleton? []) => false
(singleton? [1 2 3]) => false)

(facts "last-element"
(last-element []) => nil
(last-element [1 2 3]) => 3
(last-element [2 5]) => 5)
(facts "my-last"
(my-last []) => nil
(my-last [1 2 3]) => 3
(my-last [2 5]) => 5)

(facts "my-filter"
(my-filter odd? [1 2 3 4]) => '(1 3)
Expand Down

0 comments on commit 9a7e303

Please sign in to comment.