Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Issue 207823002: Make generator argument to Iterable.generate optional. (Closed)

Created:
6 years, 9 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 9 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make generator argument to Iterable.generate optional. It defaults to an integer identity function. Also optimize skip/take on the generated iterable by making it take hold start and end positions instead of just the count. R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=34240

Patch Set 1 #

Patch Set 2 : Add tests. Fix bugs. #

Patch Set 3 : Changed contrustor to not throw on negative count, just cap it to zero. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -10 lines) Patch
M sdk/lib/core/iterable.dart View 1 2 chunks +39 lines, -9 lines 0 comments Download
M sdk/lib/internal/iterable.dart View 1 1 chunk +1 line, -1 line 0 comments Download
A tests/corelib/iterable_generate_test.dart View 1 2 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein Nielsen
6 years, 9 months ago (2014-03-21 08:55:29 UTC) #1
Søren Gjesse
lgtm
6 years, 9 months ago (2014-03-21 09:03:26 UTC) #2
Lasse Reichstein Nielsen
6 years, 9 months ago (2014-03-21 09:54:54 UTC) #3
Message was sent while issue was closed.
Committed patchset #3 manually as r34240 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698