Skip to content

Commit

Permalink
Merge pull request ocaml#13664 from olejodd10/doc-map-add-to-list
Browse files Browse the repository at this point in the history
Improve documentation of Map.S.add_to_list
  • Loading branch information
gasche authored Dec 8, 2024
2 parents d90601c + 6fad55e commit fc33464
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stdlib/map.mli
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module type S =
val add_to_list: key -> 'a -> 'a list t -> 'a list t
(** [add_to_list key data m] is [m] with [key] mapped to [l] such
that [l] is [data :: Map.find key m] if [key] was bound in
[m] and [[v]] otherwise.
[m] and [[data]] otherwise.
@since 5.1 *)

val update: key -> ('a option -> 'a option) -> 'a t -> 'a t
Expand Down
2 changes: 1 addition & 1 deletion stdlib/moreLabels.mli
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ module Map : sig
val add_to_list: key:key -> data:'a -> 'a list t -> 'a list t
(** [add_to_list ~key ~data m] is [m] with [key] mapped to [l] such
that [l] is [data :: Map.find key m] if [key] was bound in
[m] and [[v]] otherwise.
[m] and [[data]] otherwise.
@since 5.1 *)

val update: key:key -> f:('a option -> 'a option) -> 'a t -> 'a t
Expand Down
2 changes: 1 addition & 1 deletion stdlib/templates/map.template.mli
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module type S =
val add_to_list: key:key -> data:'a -> 'a list t -> 'a list t
(** [add_to_list ~key ~data m] is [m] with [key] mapped to [l] such
that [l] is [data :: Map.find key m] if [key] was bound in
[m] and [[v]] otherwise.
[m] and [[data]] otherwise.
@since 5.1 *)

val update: key:key -> f:('a option -> 'a option) -> 'a t -> 'a t
Expand Down

0 comments on commit fc33464

Please sign in to comment.