fsprojects / fsprojects/FSharpPlus

[API Proposal]: Collections: Add useful inverses

Open
#683 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
941
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Background and motivation

See https://github.com/demystifyfp/FsToolkit.ErrorHandling/issues/377

API Proposal
isNotEmpty // see https://github.com/jet/propulsion/blob/master/src/Propulsion/Internal.fs#L239
reject
none
API Usage

see https://github.com/demystifyfp/FsToolkit.ErrorHandling/issues/377

Alternative Designs

Don't implement anything, keep doing:

not << isEmpty
filter (not << predicate)
forall (not << predicate)
isNotEmpty xs && forall predicate xs
Risks

Possible divergence/clash with future F# core additions.

Are you willing to help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?

No Maybe

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked FsToolkit.ErrorHandling issue 377 and the referenced Propulsion Internal.fs implementation. Compare the proposed isNotEmpty, reject, and none inverses with the existing FSharpPlus collection API, then clarify the accepted scope and whether a proof-of-concept is wanted; done requires an agreed API design and maintainer-approved implementation path.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.