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=a3ac1073b0728b94f4bdb0111772c0abaf7ff70324399450eab7156bfac151f1
sha512=bed6ddbde28088e43db0d40ab27056ba22537d19ffe8117a3da4c77676948f18708b06937dd2c972dce5c5822ea751c9c85cfa1ce3c1b3739460d4a24ebc2282
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.