Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Is it possible to add concrete implementation of monad for IObservable<'a> ?

オープン
#459 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
領域
tooling

調査の方向性

Control/Monad.fs から始め、既存の Monad CE サポートと System.Reactive.Linq の IObservable.Select、SelectMany、Observable.Return を比較します。予定外の System.Reactive 依存関係を導入せずに、具体的な IObservable<'a> インスタンスをそこに置くべきかを判断し、言及されている Using メソッドと Defer メソッドを検討します。サポート対象の範囲と依存関係の方針が解決されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement help wanted

Currently IObservable<'a> works fine with map / |>>, but does not work with monad CE.

Since IObservable<'a> has LINQ extension methods IObservable.Select, IObservable.SelectMany and Observable.Return. It seems that it might be nature to have monad instance just following System.Reactive.Linq 's implementation.

As discussed in here, adding concrete implementation for IObservable<'a> in FSharpPlu.Control might be the easiest way to achieve this.

Is it possible to add monad instance concrete implementation directly to F#+?

If there is no other constrains, adding concreate implementation in Control/Monad.fs might be as easy as several lines of code to direct call IObservable<'a>'s corresponding extension methods.

But there might be some problems, like introduce dependency to System.Reactive, and maybe Using / Defer and other methods needs also be considered. But considering IObservable<'a> is already provided in System namespace, and Rx.Net is an popular functional style library, solving these problems might have enough benefits.

主要言語
F#
スター
942
フォーク
106
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fsprojects/FSharpPlus のほかの issue

fsprojects/FSharpPlus の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。