Skip to content

Commit

Permalink
Merge pull request #7 from NicklasXYZ/main
Browse files Browse the repository at this point in the history
Remove public functions that should be private
  • Loading branch information
NicklasXYZ committed Sep 17, 2023
2 parents 2b4c55e + ed64533 commit 637f052
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/gleam_community/maths/arithmetics.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn gcd(x: Int, y: Int) -> Int {
do_gcd(absx, absy)
}

pub fn do_gcd(x: Int, y: Int) -> Int {
fn do_gcd(x: Int, y: Int) -> Int {
case x == 0 {
True -> y
False -> {
Expand Down Expand Up @@ -171,7 +171,7 @@ pub fn divisors(n: Int) -> List(Int) {
find_divisors(n)
}

pub fn find_divisors(n: Int) -> List(Int) {
fn find_divisors(n: Int) -> List(Int) {
let nabs: Float = piecewise.float_absolute_value(conversion.int_to_float(n))
let assert Ok(sqrt_result) = elementary.square_root(nabs)
let max: Int = conversion.float_to_int(sqrt_result) + 1
Expand Down
2 changes: 1 addition & 1 deletion src/gleam_community/maths/metrics.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ pub fn variance(arr: List(Float), ddof: Int) -> Result(Float, String) {
///
/// Calculcate the sample standard deviation of the elements in a list:
/// \\[
/// s = \left(\frac{1}{n - d} \sum_{i=1}^{n}(x_i - \bar{x}))\right)^{\frac{1}{2}}
/// s = \left(\frac{1}{n - d} \sum_{i=1}^{n}(x_i - \bar{x})\right)^{\frac{1}{2}}
/// \\]
///
/// In the formula, $$n$$ is the sample size (the length of the list) and
Expand Down

0 comments on commit 637f052

Please sign in to comment.