Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add practice exercise rational-numbers #248

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

natanaelsirqueira
Copy link
Sponsor Contributor

No description provided.

Copy link
Contributor

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Let's iron out some wrinkles :)

exercises/practice/rational-numbers/.meta/example.gleam Outdated Show resolved Hide resolved
exercises/practice/rational-numbers/.meta/example.gleam Outdated Show resolved Hide resolved
pub fn power_of_real(
number base: Int,
to exponent: RationalNumber,
) -> Result(Float, Nil) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels strange to have a Result here but no test with an error case...
What do you think?
Maybe we should add a test case with a negative base to the problem-specs?

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll work on a PR later today.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened the PR and it got closed as expected. Are you able to reopen?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Let's wait for the PR to be merged before merging this one :)

exercises/practice/rational-numbers/.meta/example.gleam Outdated Show resolved Hide resolved
exercises/practice/rational-numbers/.meta/example.gleam Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants