Skip to content

Commit 0872827

Browse files
committed
Add missing stubs and standardize all stubs.
1 parent 1ec168e commit 0872827

File tree

59 files changed

+210
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+210
-91
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule accumulate
2+
(export (accumulate 1)))
3+
4+
; Please implement the exported function(s).
5+
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule acronym
2-
(export (abbreviate 1)))
2+
(export (abbreviate 1)))
3+
4+
; Please implement the exported function(s).
35

4-
(defun abbreviate (str)
5-
(throw "Please implement the abbreviate function"))

exercises/practice/allergies/src/allergies.lfe

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
(export (allergies 1)
33
(allergic-to? 2)))
44

5-
; Please implement the allergies and allergic-to? functions
5+
; Please implement the exported function(s).
6+
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule anagram
22
(export (find 2)))
33

4-
; Please implement the find function
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule armstrong-numbers
22
(export (armstrong-number? 1)))
33

4-
; Please implement the armstrong-number? function
4+
; Please implement the exported function(s).
55

exercises/practice/atbash-cipher/src/atbash-cipher.lfe

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
(export (encode 1)
33
(decode 1)))
44

5-
; Please implement the encode and decode functions.
5+
; Please implement the exported function(s).
6+

exercises/practice/bank-account/src/bank-account.lfe

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
(deposit 2)
77
(withdraw 2)))
88

9-
; Please implement the exported functions.
9+
; Please implement the exported function(s).
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(defmodule beer-song
2+
(export (verse 1)
3+
(sing 2)))
4+
5+
; Please implement the exported function(s).
6+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule binary-search
22
(export (find 2)))
33

4-
; please implement the find function
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule binary-string
22
(export (to-decimal 1)))
33

4-
; please implement the to-decimal function
4+
; Please implement the exported function(s).
55

exercises/practice/bob/src/bob.lfe

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule bob
2+
(export (response-for 1)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(defmodule circular-buffer
2+
(export (create 1)
3+
(read 1)
4+
(size 1)
5+
(write 2)
6+
(write-attempt 2)))
7+
8+
; Please implement the exported function(s).
9+
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(defmodule clock
2+
(export (create 2)
3+
(equal? 2)
4+
(minutes-add 2)
5+
(minutes-delete 2)
6+
(to-string 1)))
7+
8+
; Please implement the exported function(s).
9+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule collatz-conjecture
22
(export (steps 1)))
33

4-
; Please implement the steps function.
4+
; Please implement the exported function(s).
5+
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule darts
22
(export (score 2)))
33

4-
; Please implement the score function.
4+
; Please implement the exported function(s).
5+

exercises/practice/difference-of-squares/src/difference-of-squares.lfe

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,5 @@
33
(sum-of-squares 1)
44
(difference-of-squares 1)))
55

6-
; Please implement the square-of-sum function.
6+
; Please implement the exported function(s).
77

8-
; Please implement the sum-of-squares function.
9-
10-
; Please implement the difference-of-squares function.

exercises/practice/dnd-character/src/dnd-character.lfe

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
(get-charisma 1)
1111
(get-hitpoints 1)))
1212

13-
; Please implement the exported functions.
13+
; Please implement the exported function(s).
14+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule eliuds-eggs
22
(export (egg-count 1)))
33

4-
; Please implement the egg-count function.
4+
; Please implement the exported function(s).
5+

exercises/practice/etl/src/etl.lfe

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule etl
2+
(export (transform 1)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule gigasecond
2+
(export (from 1)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(defmodule grade-school
2+
(export (add 3)
3+
(get 2)
4+
(new 0)
5+
(sort 1)))
6+
7+
; Please implement the exported function(s).
8+
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(defmodule grains
2+
(export (square 1)
3+
(total 0)))
4+
5+
; Please implement the exported function(s).
6+
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule hamming
22
(export (distance 2)))
33

4-
; Please implement the distance function.
4+
; Please implement the exported function(s).
5+

exercises/practice/hello-world/src/hello-world.lfe

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
(defun hello-world ()
55
"Goodbye, Mars!")
6+

exercises/practice/high-scores/src/high-scores.lfe

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
(personal-best 1)
44
(personal-top-three 1)))
55

6-
; Please implement the exported functions.
6+
; Please implement the exported function(s).
77

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule isogram
22
(export (isogram? 1)))
33

4-
; Please implement the isogram? function.
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule largest-series-product
2+
(export (from-string 2)))
3+
4+
; Please implement the exported function(s).
5+

exercises/practice/leap/src/leap.lfe

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule leap
2+
(export (leap-year 1)))
3+
4+
; Please implement the exported function(s).
5+
+9-41
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
11
(defmodule list-ops
2-
(export
3-
(append 2)
4-
(concat 1)
5-
(filter 2)
6-
(length 1)
7-
(map 2)
8-
(foldl 3)
9-
(foldr 3)
10-
(reverse 1)
11-
)
12-
)
2+
(export (append 2)
3+
(concat 1)
4+
(filter 2)
5+
(length 1)
6+
(map 2)
7+
(foldl 3)
8+
(foldr 3)
9+
(reverse 1)))
1310

14-
(defun append (list1 list2)
15-
; Please implement the 'append' function
16-
)
11+
; Please implement the exported function(s).
1712

18-
(defun concat (content)
19-
; Please implement the 'concat' function
20-
)
21-
22-
(defun filter (content filter-func)
23-
; Please implement the 'filter' function
24-
)
25-
26-
(defun length (contents)
27-
; Please implement the 'length' function
28-
)
29-
30-
(defun map (contents map-func)
31-
; Please implement the 'map' function
32-
)
33-
34-
(defun foldl (contents initial fold-func)
35-
; Please implement the 'foldl' function
36-
)
37-
38-
(defun foldr (contents initial fold-func)
39-
; Please implement the 'foldr' function
40-
)
41-
42-
(defun reverse (contents)
43-
; Please implement the 'reverse' function
44-
)

exercises/practice/luhn/src/luhn.lfe

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule luhn
2-
(export (valid? 1))
3-
)
2+
(export (valid? 1)))
3+
4+
; Please implement the exported function(s).
45

5-
; Please implement the `valid?` function.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule matching-brackets
22
(export (paired? 1)))
33

4-
; Please implement the paired? function.
4+
; Please implement the exported function(s).
5+
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule meetup
2+
(export (schedule 4)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule nucleotide-count
22
(export (counts 1)))
33

4-
; Please implement the counts function
4+
; Please implement the exported function(s).
5+
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule pangram
22
(export (pangram? 1)))
33

4-
; Please implement the pangram? function.
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule parallel-letter-frequency
2+
(export (dict 1)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule perfect-numbers
22
(export (classify 1)))
33

4-
; Please implement the 'classify' function
4+
; Please implement the exported function(s).
55

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule phone-number
22
(export (clean 1)))
33

4-
; Please implement the clean function.
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule protein-translation
22
(export (proteins 1)))
33

4-
; Please implement the 'proteins' function
4+
; Please implement the exported function(s).
5+

exercises/practice/queen-attack/src/queen-attack.lfe

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
(export (create 2)
33
(can-attack 2)))
44

5-
; Please implement the create and can-attack functions.
5+
; Please implement the exported function(s).
6+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule raindrops
22
(export (convert 1)))
33

4-
; Please implement the `convert` function.
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule resistor-color-duo
22
(export (value 1)))
33

4-
; Please implement the value function.
4+
; Please implement the exported function(s).
5+

exercises/practice/resistor-color/src/resistor-color.lfe

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
(defmodule resistor-color
2-
(export (color-code 1) (colors 0)))
2+
(export (color-code 1)
3+
(colors 0)))
4+
5+
; Please implement the exported function(s).
36

4-
; Please implement the color-code and colors functions.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(defmodule reverse-string
22
(export (reverse 1)))
33

4-
; Please implement the `reverse` function.
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(defmodule rna-transcription
2+
(export (to-rna 1)))
3+
4+
; Please implement the exported function(s).
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(defmodule robot-simulator
2+
(export (create 0)
3+
(place 3)
4+
(direction 1)
5+
(position 1)
6+
(left 1)
7+
(right 1)
8+
(advance 1)
9+
(control 2)
10+
11+
;; gen_server stuff
12+
(init 1)
13+
(handle_cast 2)
14+
(handle_call 3))
15+
(behaviour gen_server))
16+
17+
; Please implement the exported function(s).
18+
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(defmodule roman-numerals
2-
(export (roman 1))
3-
)
2+
(export (roman 1)))
3+
4+
; Please implement the exported function(s).
45

5-
; Please implement the roman function

0 commit comments

Comments
 (0)