We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1c6017 commit 9a7e303Copy full SHA for 9a7e303
src/recursion.clj
@@ -6,7 +6,7 @@
6
(defn singleton? [coll]
7
:-)
8
9
-(defn last-element [coll]
+(defn my-last [coll]
10
11
12
(defn my-filter [f a-seq]
test/recursion_test.clj
@@ -15,10 +15,10 @@
15
(singleton? []) => false
16
(singleton? [1 2 3]) => false)
17
18
-(facts "last-element"
19
- (last-element []) => nil
20
- (last-element [1 2 3]) => 3
21
- (last-element [2 5]) => 5)
+(facts "my-last"
+ (my-last []) => nil
+ (my-last [1 2 3]) => 3
+ (my-last [2 5]) => 5)
22
23
(facts "my-filter"
24
(my-filter odd? [1 2 3 4]) => '(1 3)
0 commit comments