Skip to content

Commit

Permalink
Readjusted ToMaybeIO location
Browse files Browse the repository at this point in the history
  • Loading branch information
MorleyDev committed Jun 8, 2017
1 parent 95fe7ff commit b16bf79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public static class ObservableExtensions

public static ManyIO<T> ToManyIO<T>(this IObservable<T> self) => ManyIO<T>.From(self);

public static MaybeIO<T> ToMaybeIO<T>(this IObservable<T> self) => MaybeIO.ToMaybeIO(self);
public static MaybeIO<T> ToMaybeIO<T>(this IObservable<T> self) => MaybeIO.From(self);

public static MaybeIO<T> ToMaybeIO<T>(this IObservable<Maybe<T>> self) => MaybeIO.From(self);
}
}
6 changes: 2 additions & 4 deletions src/MorleyDev.Reactive.Monad/MaybeIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ public static class MaybeIO

public static MaybeIO<T> From<T>(IObservable<T> self) => self.Select(Maybe.Just).DefaultIfEmpty(Maybe.None).ToIO();

public static MaybeIO<T> From<T>(IObservable<Maybe<T>> self) => self.ToIO();

public static MaybeIO<T> From<T>(Func<Maybe<T>> self) => IO.From(self);

public static MaybeIO<T> From<T>(Func<Task<Maybe<T>>> self) => IO.From(self);

public static MaybeIO<T> ToMaybeIO<T>(this IObservable<T> self) => self.Select(Maybe.Just).DefaultIfEmpty(Maybe.None).ToIO();

public static MaybeIO<T> ToMaybeIO<T>(this IO<Maybe<T>> self) => self;
}

/// <summary>
Expand Down

0 comments on commit b16bf79

Please sign in to comment.