use operator name in print_fold

This commit is contained in:
Rhiannon Morris 2020-12-03 15:24:43 +01:00
parent 6ac8be6984
commit e0b2dfe566
3 changed files with 36 additions and 2 deletions

View file

@ -8,6 +8,9 @@ type 'a monoid =
op: 'a -> 'a -> 'a;
op_name: string;
pp: Format.formatter -> 'a -> unit}
val fold_list: 'a monoid -> 'a list -> 'a
val mult: int monoid
val add: int monoid