Skip to content

Conversation

@sogaiu
Copy link
Collaborator

@sogaiu sogaiu commented Jan 24, 2025

This PR suggests tweaking some of the examples for %.

Looking at the first four, I got the sense that expressing all combinations of signs for the arguments was the intent:

(% 10 3) # -> 1
(% -10 3) # -> -1
(% 10 -3) # -> 1
(% -10 -3) # -> -1

The second set of four examples has been tweaked to match the pattern (as otherwise there are duplicate examples).

A similar change in sign was applied to (% -1.4 0) to make it (% 1.4 0) so that there were two distinct examples.

The last two examples also use nan? to make the result possibly less confusing.

Copy link
Member

@pepe pepe left a comment

Choose a reason for hiding this comment

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

LGTM

@sogaiu sogaiu merged commit d37d0ce into janet-lang:master Jan 24, 2025
1 check passed
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.

2 participants