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=420dfd5897d2a1da92e5d6a6c562d0f733871f711666c1741c00f57ef77dbd82
sha512=b9bdcffedf14c11daa2854b11fe28a14c9ed4bc9bdaf869be78fdb94f5954e038ef477ad91fab0a1e221916f232fa437b36cf6358e4adc62ac452b33ab6adc66
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.