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

Make Stream.withFilter.{map,flatMap} run in constant stack space #1167

Merged
merged 5 commits into from Aug 22, 2012

Commits on Aug 20, 2012

  1. Make Stream.withFilter.{map,flatMap} run in constant stack space

    The included test currently fails because `map` and `flatMap` do not
    run in constant stack space on a stream returned by `Stream.withFilter`,
    as I reported here:
    https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ
    
    Fix the problem and add a simple testcase.
    
    Note that the stack space consumed when producing an element of this stream is
    proportional to the number of elements failing the test before the next
    success. The stack space consumed to produce the stream itself is the
    space needed to produce the first element, that is, is proportional to
    the number of failures before the first success.
    Blaisorblade committed Aug 20, 2012
    Configuration menu
    Copy the full SHA
    80b3f43 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    631faf4 View commit details
    Browse the repository at this point in the history
  3. Cleanup testcase

    No need to check the output - checking programmatically that the
    produced streams are empty is enough.
    Blaisorblade committed Aug 20, 2012
    Configuration menu
    Copy the full SHA
    baca952 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2012

  1. Improve test for Stream.withFilter.{map,flatMap}

    Test a wider range of functionality.
    Blaisorblade committed Aug 22, 2012
    Configuration menu
    Copy the full SHA
    ee40800 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d770a7 View commit details
    Browse the repository at this point in the history