Skip to content

Commit ecaeadd

Browse files
exercise stubs - part 2 of 4 (#285)
[no important files changed]
1 parent 0de9e2c commit ecaeadd

File tree

8 files changed

+40
-0
lines changed

8 files changed

+40
-0
lines changed

exercises/practice/hamming/source/hamming.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module hamming;
22

3+
pure int distance(immutable string lhs, immutable string rhs)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
import std.exception : assertThrown;

exercises/practice/isogram/source/isogram.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module isogram;
22

3+
pure bool isIsogram(immutable string phrase)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

exercises/practice/luhn/source/luhn.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module luhn;
22

3+
pure bool valid(immutable string input)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

exercises/practice/matching-brackets/source/matching_brackets.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module matching_brackets;
22

3+
pure bool isPaired(immutable string input)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

exercises/practice/nth-prime/source/nth_prime.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module nth_prime;
22

3+
pure int prime(immutable int number)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
import std.exception : assertThrown;

exercises/practice/pangram/source/pangram.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module pangram;
22

3+
pure bool isPangram(immutable string str)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

exercises/practice/perfect-numbers/source/perfect_numbers.d

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ enum Classification
77
ABUNDANT
88
}
99

10+
pure Classification classify(immutable int input)
11+
{
12+
// implement this function
13+
}
14+
1015
unittest
1116
{
1217
import std.exception : assertThrown;

exercises/practice/prime-factors/source/prime_factors.d

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module prime_factors;
22

3+
pure int[] factors(immutable long value)
4+
{
5+
// implement this function
6+
}
7+
38
unittest
49
{
510
immutable int allTestsEnabled = 0;

0 commit comments

Comments
 (0)