Skip to content

Conversation

jzxchiang1
Copy link
Contributor

Self-explanatory

nomeata
nomeata previously approved these changes Jan 9, 2022
test/iterTest.mo Outdated
let expected = [1, 3];

for (i in actual.keys()) {
assert(actual[i] == expected[i]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just write assert(actual == expected);, i.e. without the surrounding loop?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's actually better, because else it wouldn't notice if actual is too short

@ggreif ggreif changed the title Add Iter.filter method and simplify Iter.map implementation Add Iter.filter method and simplify Iter.map implementation Jan 9, 2022
Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this looks good to me!

@ggreif ggreif merged commit d46ae98 into dfinity:master Jan 9, 2022
@jzxchiang1 jzxchiang1 deleted the refactor-iter branch January 11, 2022 05:06
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.

3 participants