Skip to content

Modulo operator #15

@MariusDoe

Description

@MariusDoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions