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

Modulo operator #15

Open
MariusDoe opened this issue Oct 23, 2022 · 0 comments
Open

Modulo operator #15

MariusDoe opened this issue Oct 23, 2022 · 0 comments

Comments

@MariusDoe
Copy link

MariusDoe commented Oct 23, 2022

In KoanAboutCollectionProtocol, test04select includes

self assert: {2 . 4 . 6} equals: ({1 . 2 . 3 . 4 . 5 . 6} select: xx)

This to me looks like [:aNumber | aNumber \\ 2 = 0] or similar. However, \\ as the modulo operator is rather unusual compared to other programming languages the students might already know (most use %, mod or similar). Maybe a hint regarding the operator could be added?

If looking for the operator in Number or SmallInteger as part of the solution finding process is intended, I'm happy to close.

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

No branches or pull requests

1 participant