tablecloth icon indicating copy to clipboard operation
tablecloth copied to clipboard

Add Option.andThen2

Open Dean177 opened this issue 5 years ago • 0 comments

This is like Option.map2 but andThen rather than map

  let andThen2 (a : 'a option) (b : 'b option) ~(f : 'a -> 'b -> 'c option) :
      'c option =
    match (a, b) with Some a, Some b -> f a b | _ -> None

It would need:

  • Interface file entries
  • Documentation
  • Tests

Dean177 avatar Jun 18 '20 19:06 Dean177