exercism / fsharp

Exercism exercises in F#.
https://exercism.org/tracks/fsharp
MIT License
107 stars 101 forks source link

Perfect Numbers tests does not finish #1172

Closed 64J0 closed 1 year ago

64J0 commented 1 year ago

Description:

I'm currently trying to submit my proposed solution to the Perfect Numbers exercise in F#.

Until now, I was not able to make the automated tests finish.

My code submission:

module PerfectNumbers

type Classification =
    | Perfect
    | Abundant
    | Deficient 

let rec getAliquotSum (number: int) (state: int) (out: int list): int =
    if (state = number) then out |> List.sum
    else
        match (number % state) with
        | 0 -> getAliquotSum number (state + 1) (state::out)
        | _ -> getAliquotSum number (state + 1) out

let classify (number: int): Classification option =
    if (number < 1) then None
    else
        let aliquotSum = getAliquotSum number 2 [1]

        if (aliquotSum = number) then Some Classification.Perfect
        elif (aliquotSum > number) then Some Classification.Abundant
        else Some Classification.Deficient

I'm getting this error:

image

github-actions[bot] commented 1 year ago

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

64J0 commented 1 year ago

Bad support experience 👎🏼