[go: up one dir, main page]

Lwtreslib: Option.filter* and fuzz-testing options

Context

Salut. Cela fait plusieurs fois maintenant que je relis du code qui suit le motif suivant:

match ... with Some s when p s -> Some s | _ -> None

A-t-on une fonction qui fait déjà ça dans la codebase? Sinon, pourrait-on rajouter

By popular* demand, here are Option.filter and friends with a battery of tests.

*: with a population lower bound of 1

Manually testing the MR

dune runtest src/lib_lwt_result_stdlib

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • N/A Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • N/A For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, the Development Version section of CHANGES.md for everything else).
  • Select suitable reviewers using the Reviewers field below.
Edited by Raphaël Proust

Merge request reports

Loading