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

Add Iterant.dump method #434

Closed
alexandru opened this issue Sep 19, 2017 · 4 comments
Closed

Add Iterant.dump method #434

alexandru opened this issue Sep 19, 2017 · 4 comments

Comments

@alexandru
Copy link
Member

Observable has the .dump utility that we need for Iterant:

Signature:

sealed abstract class Iterant[F[_], A] {
  // ...
  def dump(prefix: String, out: PrintStream = System.out): Iterant[F, A]
}

Usage:

Iterant[Task].range(0, 4)
  .dump("O")
  .completeL.runAsync

What this does is to dump the incoming events to standard output, like so:

O --> 0
O --> 1
O --> 2
O --> 3
O completed
@Avasil
Copy link
Collaborator

Avasil commented Sep 22, 2017

I'd like to take this one as well :)

I see that in Observable it looks a bit different:

0: O-->0
1: O-->1
2: O-->2
3: O-->3
4: O completed

I feel like extra spaces are nicer but consistency might be more important unless we also update Observable and Observer?

@alexandru
Copy link
Member Author

Ah, right, yeah, do the output like what we have with Observable, those index numbers are important, although you might add some spacing into Observable as well.

This is output meant for debugging, so people shouldn't have parsed that output anyway.

@alexandru
Copy link
Member Author

@Avasil and yes, feel free to work on it.

@alexandru
Copy link
Member Author

alexandru commented Nov 14, 2017

Solved in #439.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants