Skip to content
Discussion options

You must be logged in to vote

I've made some improvements in v5.0.0-beta-75:

  • The merge function now forces evaluation of the monad, so this should cause lazy sequences to start yielding.
  • I've added a Delay combinator that allows delaying the yielding of the items in a SourceT
  • As well as some other additions and fixes relating to subscribing to events and tidying up of resources

In your original example you never needed to fold at all, but if you wanted to merge two streams and take the first item yielded, then this will work:

public static IO<Seq<IObservation>> Think(Duration duration)
{
    var empty        = SourceT.pure<IO, Seq<IObservation>>([]);
    var timeout      = empty.Delay(duration);
    var observations = 

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
16 replies
@mysticfall
Comment options

@louthy
Comment options

@mysticfall
Comment options

@louthy
Comment options

Answer selected by mysticfall
@mysticfall
Comment options

@mysticfall
Comment options

@louthy
Comment options

@mysticfall
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants