Collection types
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
- issue の種類
- リファクタリング
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- fsharp
- 領域
- tooling
調査の方向性
まず Foldable.fs と Collection.fs を確認し、filter、ofSeq、ofList、intersperse に注目します。これらの抽象化要件を、リンク先の Haskell と PureScript の説明と比較し、その後、各モジュールにどの関数を配置すべきかを判断します。コレクション関数が、意図された API の動作を変更せずに一貫した形で再編成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This is a long standing design issue, however it doesn't seem to have any impact in usability, but the real impact seems to be that it's a bit confusing how to organize the source code.
The question arise on how can we unify List, Array, Seq and so on.
Foldable concentrates most operations but not all of them, for example singleton is not a Foldable operation, it seems to be exactly the opposite of a Foldable.
Then we have some stuff that falls in the middle, typically operations that take a "CollectionX" as input, do something and return the same type of "CollectionX".
There is lot of confusion because normally these collection types are required to be Foldable, but that requirement is not enough, they must belong at the same time to another abstraction.
Collection and Unfoldable abstractions seems to provide an answer, here's an explanation from a Haskell implementation and here's a Purescript implementation of Unfoldable
Reflecting over this, we can conclude (among many other things) that placing Filter in Foldable.fs is simply wrong. Filter seems to be one of the only functions from Collection, which means that is a Foldable and an Unfoldable at the same time.
So I propose to start organizing our functions accordingly. Starting to move to Foldable everything that is specific to Foldable but doesn't require Unfoldable, and what doesn't fall there should be moved into Collection.fs for now (later we can decide to partition it into Unfoldable.fs and Collection.fs).
I have the feeling that ofSeq (ofList as well) belongs to Unfoldable, see also: http://hackage.haskell.org/package/unfoldable-0.9.6/docs/Data-Unfoldable.html
If my memory serves me right, it was moved to Foldable because intersperse (which requires foldable and monoid as showed in purescript implementation) had a generic default overload that use ofSeq but this is an optimization, not a requirement. An optimization for Unfoldables, now we would have to move it to Collection.fs because of this which is more a technical limitation.
- 主要言語
- F#
- スター
- 941
- フォーク
- 106
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/FSharpPlus のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
fsprojects/FSharpPlus#683 · コメント 1 件 · リアクション 2 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
fsprojects/FSharpPlus#678 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
fsprojects/FSharpPlus#644 ·
-
breaking change F#+ v2.0
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
fsprojects/FSharpPlus#643 ·
-
lens type signature オープンbreaking change F#+ v2.0
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
fsprojects/FSharpPlus#641 ·
fsprojects/FSharpPlus の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/skills#1811 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
CachyOS/distribution#587 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
datalayer/mcp-compose#42 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100