package lsp
Install
Dune Dependency
Authors
-
AAndrey Popp <8mayday@gmail.com>
-
RRusty Key <iam@stfoo.ru>
-
LLouis Roché <louis@louisroche.net>
-
OOleksiy Golovko <alexei.golovko@gmail.com>
-
RRudi Grinberg <me@rgrinberg.com>
-
SSacha Ayoun <sachaayoun@gmail.com>
-
Ccannorin <cannorin@gmail.com>
-
UUlugbek Abdullaev <ulugbekna@gmail.com>
-
Thibaut Mattio
-
MMax Lantas <mnxndev@outlook.com>
Maintainers
Sources
sha256=23006064074617974a7237443f4db6234e305b3b74eb7134bf870499cb59aafe
sha512=f6925524a9c947c104cf2b054dae118186f4c559c572fec1426bdbdc33cfc5c8e097581ad82c52f0872f8c5721852d96cff86fd66abf452350cb1d04f2f2110d
doc/lsp.stdune/Stdune/Monoid/index.html
Module Stdune.Monoid
Source
This functor extends the basic definition of a monoid by adding a convenient operator synonym ( @ ) = combine
, as well as derived functions reduce
and map_reduce
.
The monoid you get with empty = false
and combine = ( || )
.
The monoid you get with empty = true
and combine = ( && )
.
The string concatenation monoid with empty = ""
and combine = ( ^ )
.
The list monoid with empty = []
and combine = ( @ )
.
The list monoid with empty = []
and combine = ( @ )
.
The trivial monoid with empty = ()
and combine () () = ()
.
The addition monoid with empty = zero
and combine = ( + )
.
The multiplication monoid with empty = one
and combine = ( * )
.
The union monoid with empty = M.empty
and combine = M.union
.
The product of monoids where pairs are combined component-wise.
module Product3
(A : sig ... end)
(B : sig ... end)
(C : sig ... end) :
S with type t = A.t * B.t * C.t
Same as Product
but for 3 monoids.
Functions that return a monoid form the following monoid:
Endofunctions, i.e., functions of type t -> t
, form two monoids.