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

Add `spanAntitoneM`

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

メンテナーはふだん 2 日以内に返信

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell
領域
data

調査の方向性

まず、既存の spanAntitone エントリーポイントとそのテストを読み、提案されているモナド型シグネチャが、示されている反単調規則をどのように維持するかを比較します。spanAntitoneM が、エフェクトを持つ述語に対して指定された型と動作で追加され、クロスオーバー結果のカバレッジが含まれていれば完了です。

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

説明

feature-request IntMap Map

spanAntitone :: (k -> Bool) -> Map k a -> (Map k a, Map k a) is a handy way to "bisect" arbitrary data in the git bisect sense. Just stick your data in a Map, then use spanAntitone to find the crossover point.

Sometimes the antitone predicate cannot be defined purely though (maybe it involves interactivity, or consulting a database, or whatever), and in such cases I feel like it'd be handy to have this slight variation:

spanAntitoneM :: Monad m => (k -> m Bool) -> Map k a -> m (Map k a, Map k a)

The rule for the predicate can still be specified as j < k implies (>=) <$> p j <*> p k == f True, for some f :: forall x. x -> m x (roughly, (>=) <$> p j <*> p k always "resolves" to True).

主要言語
Haskell
スター
355
フォーク
194
平均マージ
3日 4時間
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

haskell/containers のほかの issue

haskell/containers の issue をすべて見る

似ている issue

Haskell の issue をもっと見る

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

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