Skip to content

Commit 9a7e303

Browse files
author
Jani Rahkola
committed
Renamed last-element to last.
1 parent f1c6017 commit 9a7e303

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/recursion.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(defn singleton? [coll]
77
:-)
88

9-
(defn last-element [coll]
9+
(defn my-last [coll]
1010
:-)
1111

1212
(defn my-filter [f a-seq]

test/recursion_test.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
(singleton? []) => false
1616
(singleton? [1 2 3]) => false)
1717

18-
(facts "last-element"
19-
(last-element []) => nil
20-
(last-element [1 2 3]) => 3
21-
(last-element [2 5]) => 5)
18+
(facts "my-last"
19+
(my-last []) => nil
20+
(my-last [1 2 3]) => 3
21+
(my-last [2 5]) => 5)
2222

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

0 commit comments

Comments
 (0)