• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mstade / funkis / 26
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: get-in
DEFAULT BRANCH: master
Ran 07 Apr 2014 11:29AM UTC
Jobs 1
Files 31
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
26

push

travis-ci

mstade
Added an implementation of the iterator protocol for `seq`

Because of how ES6 iterators work, in order to support the
`for..of` syntax sugar nicely we have to implement the `next`
method on the `seq` object itself. This method has side
effects, but I figure it's a small price to pay for syntactic
sugar.

An argument can (rightly) be made that these small prices we
pay for having nice things eventually turn into balls of mud,
which is why we can't have nice things. Maybe that's so, and
maybe it'd be better to implement `next` in a separate
function or as the result of an iterator property on `seq`.
([See discussion][it].)

That said, syntactic smells are also smells, and I reckon the
only winning move in this game is not to play. Since that's
too late I figure what the heck – let's do this.

As to the perhaps odd implementation of `next`, where the
iterator rewinds itself after running a course, is such that
`seq` objects can be used in multiple `for..of` statements.
For more on that, please refer to a [discussion I started on
es-discuss][es-discuss] and the [bug] that was filed as a
result.

[it]: https://github.com/mstade/funkis/pull/4#issuecomment-39681094
[es-discuss]: https://mail.mozilla.org/pipermail/es-discuss/2014-April/036874.html
[bug]: https://bugs.ecmascript.org/show_bug.cgi?id=2606

249 of 255 relevant lines covered (97.65%)

82.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26.1 07 Apr 2014 11:29AM UTC 0
97.65
Travis Job 26.1
Source Files on build 26
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #26
  • 2a0257e3 on github
  • Prev Build on lazy-seq (#23)
  • Next Build on lazy-seq (#28)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc