diff --git a/ladderz/all.html b/ladderz/all.html index b0b0017..f0107e1 100644 --- a/ladderz/all.html +++ b/ladderz/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Functions

\ No newline at end of file +List of all items in this crate

List of all items

Functions

\ No newline at end of file diff --git a/ladderz/index.html b/ladderz/index.html index 19598ee..2f6a49a 100644 --- a/ladderz/index.html +++ b/ladderz/index.html @@ -13,7 +13,7 @@ cd my_ladderz_project

Now in src/main.rs let’s replace the contents with the following code:

-
use ladderz::pre_algebra::unit1::{get_factor_pairs, get_factors};
+
use ladderz::pre_algebra::{get_factors, get_factor_pairs};
 use std::env;
 
 fn main() {
@@ -57,8 +57,8 @@ cd my_ladderz_project
 
./target/release/my_ladderz_project.exe 12
 

The printed output should be:

- -
List of factors of 12: [1, 2, 3, 4, 6, 12]
-List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)]
+
List of factors of 12: [1, 2, 3, 4, 6, 12]
+List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)]
+

Great! We’ve successfully used the ladderz crate to get the factors and factor pairs of a positive integer in sorted order.

Modules

  • Various pre-algebra implementations including factor pairs, factors, multiples, and more.
\ No newline at end of file diff --git a/ladderz/pre_algebra/fn.get_factor_pairs.html b/ladderz/pre_algebra/fn.get_factor_pairs.html new file mode 100644 index 0000000..66a1089 --- /dev/null +++ b/ladderz/pre_algebra/fn.get_factor_pairs.html @@ -0,0 +1,19 @@ +get_factor_pairs in ladderz::pre_algebra - Rust
pub fn get_factor_pairs(n: u32) -> HashSet<(u32, u32)>
Expand description

Finds all factor pairs for a positive integer n.

+

This function calculates and returns a HashSet<(u32, u32)> containing all unique factor pairs +of the input positive integer n. A factor pair is a pair of positive integers +(a, b) where a and b are both factors of n (i.e., a * b == n).

+

Examples

+
use std::collections::HashSet;
+use ladderz::pre_algebra::get_factor_pairs;
+
+fn main() {
+    let result_pairs = get_factor_pairs(12);
+    let expected_pairs: HashSet<(u32, u32)> = [(1, 12), (2, 6), (3, 4)].into();
+    assert_eq!(result_pairs, expected_pairs);
+}
+

Note

+

This function calculates factor pairs by iterating through positive integers from 1 to n +(inclusive) and checking if they divide n evenly. If they do, a factor pair (a, b) is +added to the HashSet. The function ensures that factor pairs are unique, so (a, b) and +(b, a) will not both appear in the set.

+
\ No newline at end of file diff --git a/ladderz/pre_algebra/fn.get_factors.html b/ladderz/pre_algebra/fn.get_factors.html new file mode 100644 index 0000000..6b7b991 --- /dev/null +++ b/ladderz/pre_algebra/fn.get_factors.html @@ -0,0 +1,18 @@ +get_factors in ladderz::pre_algebra - Rust
pub fn get_factors(n: u32) -> HashSet<u32>
Expand description

Finds all factors of a positive integer n.

+

This function calculates and returns a HashSet<u32> containing all unique factors +of the input positive integer n. A factor of n is a positive integer a where +n is evenly divisible by a (i.e., n % a == 0).

+

Examples

+
use std::collections::HashSet;
+use ladderz::pre_algebra::get_factors;
+
+fn main() {
+    let result_factors = get_factors(16);
+    let expected_factors: HashSet<u32> = [1, 2, 4, 8, 16].into();
+    assert_eq!(result_factors, expected_factors);
+}
+

Note

+

This function calculates factors by iterating through positive integers from 1 to n +(inclusive) and checking if they divide n evenly. If they do, the factor is added to +the HashSet. The function ensures that factors are unique, so duplicates are not added.

+
\ No newline at end of file diff --git a/ladderz/pre_algebra/fn.get_multiples_in_range.html b/ladderz/pre_algebra/fn.get_multiples_in_range.html new file mode 100644 index 0000000..0f083ad --- /dev/null +++ b/ladderz/pre_algebra/fn.get_multiples_in_range.html @@ -0,0 +1,17 @@ +get_multiples_in_range in ladderz::pre_algebra - Rust
pub fn get_multiples_in_range(n: u32, end: u32) -> HashSet<u32>
Expand description

Finds all the multiples of a positive integer n up to and including end (in the range [n, end]).

+

Returns a HashSet<u32> containing all the multiples of a positive integer n in the range [n, end].

+

A multiple of n is a positive integer num where num is evenly divisible by n (i.e., num % n == 0).

+

Examples

+
use ladderz::pre_algebra::get_multiples_in_range;
+use std::collections::HashSet;
+
+fn main() {
+    let result: HashSet<u32> = get_multiples_in_range(2, 10);
+    let expected: HashSet<u32> = [2, 4, 6, 8, 10].into();
+    assert_eq!(result, expected);
+
+    let result: HashSet<u32> = get_multiples_in_range(3, 15);
+    let expected: HashSet<u32> = [3, 6, 9, 12, 15].into();
+    assert_eq!(result, expected);
+}
+
\ No newline at end of file diff --git a/ladderz/pre_algebra/fn.is_factor.html b/ladderz/pre_algebra/fn.is_factor.html new file mode 100644 index 0000000..b33b699 --- /dev/null +++ b/ladderz/pre_algebra/fn.is_factor.html @@ -0,0 +1,13 @@ +is_factor in ladderz::pre_algebra - Rust

Function ladderz::pre_algebra::is_factor

source ·
pub fn is_factor(x: u32, y: u32) -> bool
Expand description

Checks if a positive integer x is a factor of another positive integer y.

+

A factor of y is a positive integer x where y is evenly divisible by x (i.e., y % x == 0).

+

Examples

+
use ladderz::pre_algebra::is_factor;
+
+fn main() {
+    assert!(is_factor(2, 16)); // 2 is a factor of 16
+    assert!(!is_factor(3, 16)); // 3 is not a factor of 16
+}
+

Note

+

This function determines if x is a factor of y by checking if y is evenly divisible by x +(i.e., y % x == 0).

+
\ No newline at end of file diff --git a/ladderz/pre_algebra/fn.is_multiple.html b/ladderz/pre_algebra/fn.is_multiple.html new file mode 100644 index 0000000..59a89b7 --- /dev/null +++ b/ladderz/pre_algebra/fn.is_multiple.html @@ -0,0 +1,10 @@ +is_multiple in ladderz::pre_algebra - Rust
pub fn is_multiple(x: u32, y: u32) -> bool
Expand description

Checks if a positive integer x is a multiple of another positive integer y.

+

A multiple of y is a positive integer x where x is evenly divisible by y (i.e., x % y == 0).

+

Examples

+
use ladderz::pre_algebra::is_multiple;
+
+fn main() {
+    assert!(is_multiple(16, 2)); // 16 is a multiple of 2
+    assert!(!is_multiple(16, 3)); // 16 is not a multiple of 3
+}
+
\ No newline at end of file diff --git a/ladderz/pre_algebra/index.html b/ladderz/pre_algebra/index.html index 621bc46..b215e6a 100644 --- a/ladderz/pre_algebra/index.html +++ b/ladderz/pre_algebra/index.html @@ -1,2 +1,2 @@ -ladderz::pre_algebra - Rust

Module ladderz::pre_algebra

source ·
Expand description

Various pre-algebra implementations including factor pairs, factors, multiples, and more.

-

Modules

  • Factors and multiples
\ No newline at end of file +ladderz::pre_algebra - Rust

Module ladderz::pre_algebra

source ·
Expand description

Various pre-algebra implementations including factor pairs, factors, multiples, and more.

+

Functions

  • Finds all factor pairs for a positive integer n.
  • Finds all factors of a positive integer n.
  • Finds all the multiples of a positive integer n up to and including end (in the range [n, end]).
  • Checks if a positive integer x is a factor of another positive integer y.
  • Checks if a positive integer x is a multiple of another positive integer y.
\ No newline at end of file diff --git a/ladderz/pre_algebra/sidebar-items.js b/ladderz/pre_algebra/sidebar-items.js index 4eb2190..a5fdfbb 100644 --- a/ladderz/pre_algebra/sidebar-items.js +++ b/ladderz/pre_algebra/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["unit1"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"fn":["get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"]}; \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/fn.get_factor_pairs.html b/ladderz/pre_algebra/unit1/fn.get_factor_pairs.html index 3ba6fdc..72ccb16 100644 --- a/ladderz/pre_algebra/unit1/fn.get_factor_pairs.html +++ b/ladderz/pre_algebra/unit1/fn.get_factor_pairs.html @@ -1,29 +1,11 @@ -get_factor_pairs in ladderz::pre_algebra::unit1 - Rust
pub fn get_factor_pairs(n: u32) -> HashSet<(u32, u32)>
Expand description

Finds all factor pairs for a positive integer n.

-

Challenge

-

Write a program that finds all the factor pairs for a number n.

-

Description

-

Generates a HashSet of factor pairs for a positive integer n.

-

This function calculates and returns a HashSet containing all unique factor pairs -of the input positive integer n. A factor pair is a pair of positive integers -(a, b) where a and b are both factors of n (i.e., a * b == n).

-

Arguments

-
    -
  • n - The positive integer for which factor pairs are to be calculated.
  • -
-

Returns

-

A HashSet containing all unique factor pairs of the input integer n.

-

Examples

-
use std::collections::HashSet;
-use ladderz::pre_algebra::unit1::get_factor_pairs;
-
-fn main() {
-    let result_pairs = get_factor_pairs(12);
-    let expected_pairs: HashSet<(u32, u32)> = [(1, 12), (2, 6), (3, 4)].into();
-    assert_eq!(result_pairs, expected_pairs);
-}
-

Note

-

This function calculates factor pairs by iterating through positive integers from 1 to n -(inclusive) and checking if they divide n evenly. If they do, a factor pair (a, b) is -added to the HashSet. The function ensures that factor pairs are unique, so (a, b) and -(b, a) will not both appear in the set.

-
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../../ladderz/pre_algebra/fn.get_factor_pairs.html...

+ + + \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/fn.get_factors.html b/ladderz/pre_algebra/unit1/fn.get_factors.html index 5627f8f..8a55f0e 100644 --- a/ladderz/pre_algebra/unit1/fn.get_factors.html +++ b/ladderz/pre_algebra/unit1/fn.get_factors.html @@ -1,28 +1,11 @@ -get_factors in ladderz::pre_algebra::unit1 - Rust
pub fn get_factors(n: u32) -> HashSet<u32>
Expand description

Finds all factors of a positive integer n.

-

Challenge

-

Write a program that finds all the factors of a number. Assume that n is a positive integer greater than or equal to 1.

-

Description

-

Generates a HashSet of factors for a positive integer n.

-

This function calculates and returns a HashSet containing all unique factors -of the input positive integer n. A factor of n is a positive integer a where -n is evenly divisible by a (i.e., n % a == 0).

-

Arguments

-
    -
  • n - The positive integer for which factors are to be calculated.
  • -
-

Returns

-

A HashSet containing all unique factors of the input integer n.

-

Examples

-
use std::collections::HashSet;
-use ladderz::pre_algebra::unit1::get_factors;
-
-fn main() {
-    let result_factors = get_factors(16);
-    let expected_factors: HashSet<u32> = [1, 2, 4, 8, 16].into();
-    assert_eq!(result_factors, expected_factors);
-}
-

Note

-

This function calculates factors by iterating through positive integers from 1 to n -(inclusive) and checking if they divide n evenly. If they do, the factor is added to -the HashSet. The function ensures that factors are unique, so duplicates are not added.

-
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../../ladderz/pre_algebra/fn.get_factors.html...

+ + + \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/fn.get_multiples_in_range.html b/ladderz/pre_algebra/unit1/fn.get_multiples_in_range.html index fa87791..0b0e71b 100644 --- a/ladderz/pre_algebra/unit1/fn.get_multiples_in_range.html +++ b/ladderz/pre_algebra/unit1/fn.get_multiples_in_range.html @@ -1,27 +1,11 @@ -get_multiples_in_range in ladderz::pre_algebra::unit1 - Rust
pub fn get_multiples_in_range(n: u32, end: u32) -> HashSet<u32>
Expand description

Finds all the multiples of a positive integer n up to and including end (in the range [n, end]).

-

Challenge

-

Write a program that finds all the multiples of a positive integer n in a given range.

-

Description

-

Returns a HashSet containing all the multiples of a positive integer n in the range [n, end].

-

A multiple of n is a positive integer num where num is evenly divisible by n (i.e., num % n == 0).

-

Arguments

-
    -
  • n - The positive integer for which multiples are to be found.
  • -
  • end - The upper limit of the range for finding multiples.
  • -
-

Returns

-

A HashSet containing all the multiples of n in the range [n, end].

-

Examples

-
use ladderz::pre_algebra::unit1::get_multiples_in_range;
-use std::collections::HashSet;
-
-fn main() {
-    let result: HashSet<u32> = get_multiples_in_range(2, 10);
-    let expected: HashSet<u32> = [2, 4, 6, 8, 10].into();
-    assert_eq!(result, expected);
-
-    let result: HashSet<u32> = get_multiples_in_range(3, 15);
-    let expected: HashSet<u32> = [3, 6, 9, 12, 15].into();
-    assert_eq!(result, expected);
-}
-
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../../ladderz/pre_algebra/fn.get_multiples_in_range.html...

+ + + \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/fn.is_factor.html b/ladderz/pre_algebra/unit1/fn.is_factor.html index 9b37a8c..df0e5c7 100644 --- a/ladderz/pre_algebra/unit1/fn.is_factor.html +++ b/ladderz/pre_algebra/unit1/fn.is_factor.html @@ -1,24 +1,11 @@ -is_factor in ladderz::pre_algebra::unit1 - Rust
pub fn is_factor(x: u32, y: u32) -> bool
Expand description

Checks if a positive integer x is a factor of another positive integer y.

-

Challenge

-

Write a program that determines whether one positive integer is a factor of another.

-

Description

-

Checks if a positive integer x is a factor of another positive integer y.

-

A factor of y is a positive integer x where y is evenly divisible by x (i.e., y % x == 0).

-

Arguments

-
    -
  • x - The positive integer to determine whether it is a factor of y or not.
  • -
  • y - The positive integer for which the factor check of x is performed.
  • -
-

Returns

-

true if x is a factor of y, false otherwise.

-

Examples

-
use ladderz::pre_algebra::unit1::is_factor;
-
-fn main() {
-    assert!(is_factor(2, 16)); // 2 is a factor of 16
-    assert!(!is_factor(3, 16)); // 3 is not a factor of 16
-}
-

Note

-

This function determines if x is a factor of y by checking if y is evenly divisible by x -(i.e., y % x == 0).

-
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../../ladderz/pre_algebra/fn.is_factor.html...

+ + + \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/fn.is_multiple.html b/ladderz/pre_algebra/unit1/fn.is_multiple.html index 5a5ee73..13cd304 100644 --- a/ladderz/pre_algebra/unit1/fn.is_multiple.html +++ b/ladderz/pre_algebra/unit1/fn.is_multiple.html @@ -1,21 +1,11 @@ -is_multiple in ladderz::pre_algebra::unit1 - Rust
pub fn is_multiple(x: u32, y: u32) -> bool
Expand description

Checks if a positive integer x is a multiple of another positive integer y.

-

Challenge

-

Write a program that determines whether one positive integer is a multiple of another.

-

Description

-

Checks if a positive integer x is a multiple of another positive integer y.

-

A multiple of y is a positive integer x where x is evenly divisible by y (i.e., x % y == 0).

-

Arguments

-
    -
  • x - The positive integer to determine whether it is a multiple of y or not.
  • -
  • y - The positive integer for which the multiple check of x is performed.
  • -
-

Returns

-

true if x is a multiple of y, false otherwise.

-

Examples

-
use ladderz::pre_algebra::unit1::is_multiple;
-
-fn main() {
-    assert!(is_multiple(16, 2)); // 16 is a multiple of 2
-    assert!(!is_multiple(16, 3)); // 16 is not a multiple of 3
-}
-
\ No newline at end of file + + + + + Redirection + + +

Redirecting to ../../../ladderz/pre_algebra/fn.is_multiple.html...

+ + + \ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/index.html b/ladderz/pre_algebra/unit1/index.html deleted file mode 100644 index 8e18790..0000000 --- a/ladderz/pre_algebra/unit1/index.html +++ /dev/null @@ -1,2 +0,0 @@ -ladderz::pre_algebra::unit1 - Rust

Module ladderz::pre_algebra::unit1

source ·
Expand description

Factors and multiples

-

Functions

  • Finds all factor pairs for a positive integer n.
  • Finds all factors of a positive integer n.
  • Finds all the multiples of a positive integer n up to and including end (in the range [n, end]).
  • Checks if a positive integer x is a factor of another positive integer y.
  • Checks if a positive integer x is a multiple of another positive integer y.
\ No newline at end of file diff --git a/ladderz/pre_algebra/unit1/sidebar-items.js b/ladderz/pre_algebra/unit1/sidebar-items.js deleted file mode 100644 index a5fdfbb..0000000 --- a/ladderz/pre_algebra/unit1/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"]}; \ No newline at end of file diff --git a/search-index.js b/search-index.js index b40150d..85f1e6c 100644 --- a/search-index.js +++ b/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"ladderz":{"doc":"ladderz","t":"AAFFFFF","n":["pre_algebra","unit1","get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"],"q":[[0,"ladderz"],[1,"ladderz::pre_algebra"],[2,"ladderz::pre_algebra::unit1"]],"d":["Various pre-algebra implementations including factor …","Factors and multiples","Finds all factor pairs for a positive integer n.","Finds all factors of a positive integer n.","Finds all the multiples of a positive integer n up to and …","Checks if a positive integer x is a factor of another …","Checks if a positive integer x is a multiple of another …"],"i":[0,0,0,0,0,0,0],"f":[0,0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[[1,1],3],[[1,1],3]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[15,"bool"]]}\ +"ladderz":{"doc":"ladderz","t":"AFFFFF","n":["pre_algebra","get_factor_pairs","get_factors","get_multiples_in_range","is_factor","is_multiple"],"q":[[0,"ladderz"],[1,"ladderz::pre_algebra"]],"d":["Various pre-algebra implementations including factor …","Finds all factor pairs for a positive integer n.","Finds all factors of a positive integer n.","Finds all the multiples of a positive integer n up to and …","Checks if a positive integer x is a factor of another …","Checks if a positive integer x is a multiple of another …"],"i":[0,0,0,0,0,0],"f":[0,[1,2],[1,[[2,[1]]]],[[1,1],[[2,[1]]]],[[1,1],3],[[1,1],3]],"c":[],"p":[[15,"u32"],[3,"HashSet"],[15,"bool"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/source-files.js b/source-files.js index e305606..d05a10b 100644 --- a/source-files.js +++ b/source-files.js @@ -1,4 +1,4 @@ var sourcesIndex = JSON.parse('{\ -"ladderz":["",[["pre_algebra",[],["unit1.rs"]]],["lib.rs","pre_algebra.rs"]]\ +"ladderz":["",[["pre_algebra",[],["mod.rs","unit1.rs"]]],["lib.rs"]]\ }'); createSourceSidebar(); diff --git a/src/ladderz/lib.rs.html b/src/ladderz/lib.rs.html index 8a1460a..f650ec2 100644 --- a/src/ladderz/lib.rs.html +++ b/src/ladderz/lib.rs.html @@ -117,7 +117,7 @@ //! Now in `src/main.rs` let's replace the contents with the following code: //! //! ```rust -//! use ladderz::pre_algebra::unit1::{get_factor_pairs, get_factors}; +//! use ladderz::pre_algebra::{get_factors, get_factor_pairs}; //! use std::env; //! //! fn main() { @@ -173,7 +173,7 @@ //! //! The printed output should be: //! -//! ``` +//! ```console //! List of factors of 12: [1, 2, 3, 4, 6, 12] //! List of factor pairs of 12: [(1, 12), (2, 6), (3, 4)] //! ``` diff --git a/src/ladderz/pre_algebra.rs.html b/src/ladderz/pre_algebra.rs.html deleted file mode 100644 index 3c783cf..0000000 --- a/src/ladderz/pre_algebra.rs.html +++ /dev/null @@ -1,5 +0,0 @@ -pre_algebra.rs - source
1
-2
-
/// Factors and multiples
-pub mod unit1;
-
\ No newline at end of file diff --git a/src/ladderz/pre_algebra/mod.rs.html b/src/ladderz/pre_algebra/mod.rs.html new file mode 100644 index 0000000..a0dac1b --- /dev/null +++ b/src/ladderz/pre_algebra/mod.rs.html @@ -0,0 +1,11 @@ +mod.rs - source
1
+2
+3
+4
+5
+
/// Factors and multiples
+mod unit1;
+
+#[doc(inline)]
+pub use unit1::*;
+
\ No newline at end of file diff --git a/src/ladderz/pre_algebra/unit1.rs.html b/src/ladderz/pre_algebra/unit1.rs.html index 24ad1d6..2a832c8 100644 --- a/src/ladderz/pre_algebra/unit1.rs.html +++ b/src/ladderz/pre_algebra/unit1.rs.html @@ -209,116 +209,19 @@ 209 210 211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292
use std::collections::HashSet;
 
 /// Finds all factor pairs for a positive integer `n`.
 ///
-/// # Challenge
-///
-/// Write a program that finds all the factor pairs for a number `n`.
-///
-/// # Description
-///
-/// Generates a `HashSet` of factor pairs for a positive integer `n`.
-///
-/// This function calculates and returns a `HashSet` containing all unique factor pairs
+/// This function calculates and returns a `HashSet<(u32, u32)>` containing all unique factor pairs
 /// of the input positive integer `n`. A factor pair is a pair of positive integers
 /// `(a, b)` where `a` and `b` are both factors of `n` (i.e., `a * b == n`).
 ///
-/// # Arguments
-///
-/// * `n` - The positive integer for which factor pairs are to be calculated.
-///
-/// # Returns
-///
-/// A `HashSet` containing all unique factor pairs of the input integer `n`.
-///
 /// # Examples
 ///
 /// ```rust
 /// use std::collections::HashSet;
-/// use ladderz::pre_algebra::unit1::get_factor_pairs;
+/// use ladderz::pre_algebra::get_factor_pairs;
 ///
 /// fn main() {
 ///     let result_pairs = get_factor_pairs(12);
@@ -351,31 +254,15 @@
 
 /// Finds all factors of a positive integer `n`.
 ///
-/// # Challenge
-///
-/// Write a program that finds all the factors of a number. Assume that `n` is a positive integer greater than or equal to 1.
-///
-/// # Description
-///
-/// Generates a `HashSet` of factors for a positive integer `n`.
-///
-/// This function calculates and returns a `HashSet` containing all unique factors
+/// This function calculates and returns a `HashSet<u32>` containing all unique factors
 /// of the input positive integer `n`. A factor of `n` is a positive integer `a` where
 /// `n` is evenly divisible by `a` (i.e., `n % a == 0`).
 ///
-/// # Arguments
-///
-/// * `n` - The positive integer for which factors are to be calculated.
-///
-/// # Returns
-///
-/// A `HashSet` containing all unique factors of the input integer `n`.
-///
 /// # Examples
 ///
 /// ```rust
 /// use std::collections::HashSet;
-/// use ladderz::pre_algebra::unit1::get_factors;
+/// use ladderz::pre_algebra::get_factors;
 ///
 /// fn main() {
 ///     let result_factors = get_factors(16);
@@ -402,29 +289,12 @@
 
 /// Checks if a positive integer `x` is a factor of another positive integer `y`.
 ///
-/// # Challenge
-///
-/// Write a program that determines whether one positive integer is a factor of another.
-///
-/// # Description
-///
-/// Checks if a positive integer `x` is a factor of another positive integer `y`.
-///
 /// A factor of `y` is a positive integer `x` where `y` is evenly divisible by `x` (i.e., `y % x == 0`).
 ///
-/// # Arguments
-///
-/// * `x` - The positive integer to determine whether it is a factor of `y` or not.
-/// * `y` - The positive integer for which the factor check of `x` is performed.
-///
-/// # Returns
-///
-/// `true` if `x` is a factor of `y`, `false` otherwise.
-///
 /// # Examples
 ///
 /// ```rust
-/// use ladderz::pre_algebra::unit1::is_factor;
+/// use ladderz::pre_algebra::is_factor;
 ///
 /// fn main() {
 ///     assert!(is_factor(2, 16)); // 2 is a factor of 16
@@ -442,29 +312,12 @@
 
 /// Checks if a positive integer `x` is a multiple of another positive integer `y`.
 ///
-/// # Challenge
-///
-/// Write a program that determines whether one positive integer is a multiple of another.
-///
-/// # Description
-///
-/// Checks if a positive integer `x` is a multiple of another positive integer `y`.
-///
 /// A multiple of `y` is a positive integer `x` where `x` is evenly divisible by `y` (i.e., `x % y == 0`).
 ///
-/// # Arguments
-///
-/// * `x` - The positive integer to determine whether it is a multiple of `y` or not.
-/// * `y` - The positive integer for which the multiple check of `x` is performed.
-///
-/// # Returns
-///
-/// `true` if `x` is a multiple of `y`, `false` otherwise.
-///
 /// # Examples
 ///
 /// ```rust
-/// use ladderz::pre_algebra::unit1::is_multiple;
+/// use ladderz::pre_algebra::is_multiple;
 ///
 /// fn main() {
 ///     assert!(is_multiple(16, 2)); // 16 is a multiple of 2
@@ -477,29 +330,14 @@
 
 /// Finds all the multiples of a positive integer `n` up to and including `end` (in the range [n, end]).
 ///
-/// # Challenge
-///
-/// Write a program that finds all the multiples of a positive integer `n` in a given range.
-///
-/// # Description
-///
-/// Returns a HashSet containing all the multiples of a positive integer `n` in the range [n, end].
+/// Returns a `HashSet<u32>` containing all the multiples of a positive integer `n` in the range [n, end].
 ///
 /// A multiple of `n` is a positive integer `num` where `num` is evenly divisible by `n` (i.e., `num % n == 0`).
 ///
-/// # Arguments
-///
-/// * `n` - The positive integer for which multiples are to be found.
-/// * `end` - The upper limit of the range for finding multiples.
-///
-/// # Returns
-///
-/// A HashSet containing all the multiples of `n` in the range [n, end].
-///
 /// # Examples
 ///
 /// ```rust
-/// use ladderz::pre_algebra::unit1::get_multiples_in_range;
+/// use ladderz::pre_algebra::get_multiples_in_range;
 /// use std::collections::HashSet;
 ///
 /// fn main() {