From 0de9e2cfa4650c42c4a1a6d6ccdf741582ef4b88 Mon Sep 17 00:00:00 2001 From: keiravillekode Date: Thu, 3 Oct 2024 09:54:45 +1000 Subject: [PATCH] exercise stubs - part 1 of 4 (#284) [no important files changed] --- .../armstrong-numbers/source/armstrong_numbers.d | 5 +++++ exercises/practice/bob/source/bob.d | 5 +++++ .../collatz-conjecture/source/collatz_conjecture.d | 5 +++++ exercises/practice/darts/source/darts.d | 5 +++++ exercises/practice/etl/source/etl.d | 5 +++++ exercises/practice/grains/source/grains.d | 10 ++++++++++ 6 files changed, 35 insertions(+) diff --git a/exercises/practice/armstrong-numbers/source/armstrong_numbers.d b/exercises/practice/armstrong-numbers/source/armstrong_numbers.d index c715cb10..56cd127b 100644 --- a/exercises/practice/armstrong-numbers/source/armstrong_numbers.d +++ b/exercises/practice/armstrong-numbers/source/armstrong_numbers.d @@ -1,5 +1,10 @@ module armstrong_numbers; +pure bool isArmstrongNumber(immutable int number) +{ + // implement this function +} + unittest { immutable int allTestsEnabled = 0; diff --git a/exercises/practice/bob/source/bob.d b/exercises/practice/bob/source/bob.d index fea0fefb..cf3625f0 100644 --- a/exercises/practice/bob/source/bob.d +++ b/exercises/practice/bob/source/bob.d @@ -1,5 +1,10 @@ module bob; +pure string hey(immutable string text) +{ + // implement this function +} + unittest { immutable int allTestsEnabled = 0; diff --git a/exercises/practice/collatz-conjecture/source/collatz_conjecture.d b/exercises/practice/collatz-conjecture/source/collatz_conjecture.d index 1b546d71..608e5412 100644 --- a/exercises/practice/collatz-conjecture/source/collatz_conjecture.d +++ b/exercises/practice/collatz-conjecture/source/collatz_conjecture.d @@ -1,5 +1,10 @@ module collatz_conjecture; +pure int steps(immutable int number) +{ + // implement this function +} + unittest { import std.exception : assertThrown; diff --git a/exercises/practice/darts/source/darts.d b/exercises/practice/darts/source/darts.d index 27172c3b..fa8a6563 100644 --- a/exercises/practice/darts/source/darts.d +++ b/exercises/practice/darts/source/darts.d @@ -1,5 +1,10 @@ module darts; +pure int score(immutable float x, immutable float y) +{ + // implement this function +} + unittest { immutable int allTestsEnabled = 0; diff --git a/exercises/practice/etl/source/etl.d b/exercises/practice/etl/source/etl.d index 2c253d62..eb75431f 100644 --- a/exercises/practice/etl/source/etl.d +++ b/exercises/practice/etl/source/etl.d @@ -4,6 +4,11 @@ import std.array : array; import std.algorithm.sorting : sort; import std.algorithm.comparison : equal; +pure int[dchar] transform(immutable string[int] score_map) +{ + // implement this function +} + unittest { diff --git a/exercises/practice/grains/source/grains.d b/exercises/practice/grains/source/grains.d index 55d99557..092c7085 100644 --- a/exercises/practice/grains/source/grains.d +++ b/exercises/practice/grains/source/grains.d @@ -1,5 +1,15 @@ module grains; +pure ulong square(immutable ulong num) +{ + // implement this function +} + +pure ulong total() +{ + // implement this function +} + unittest { import std.exception : assertThrown;