From d6c8ad8ae4c4f516ce8c21e55f04d4adaddb3fce Mon Sep 17 00:00:00 2001 From: Maxime Jacquemin <maxime.jacquemin@cea.fr> Date: Fri, 17 Jan 2025 16:54:49 +0000 Subject: [PATCH] [Kernel] Correct odoc syntax for code blocks Credit to Thibault Martin --- src/libraries/monads/composition.mli | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libraries/monads/composition.mli b/src/libraries/monads/composition.mli index 37e9031715..65ff12e118 100644 --- a/src/libraries/monads/composition.mli +++ b/src/libraries/monads/composition.mli @@ -34,12 +34,12 @@ prove difficult, or use the provided functors of this module. Using the Option monad as the interior and the State monad as the exterior, one can trivially provide the following swap function: - ```ocaml - let swap (m : 'a State.t Option.t) : 'a Option.t State.t = - match m with - | None -> State.return None - | Some s -> State.map Option.return s - ``` + {[ + let swap (m : 'a State.t Option.t) : 'a Option.t State.t = + match m with + | None -> State.return None + | Some s -> State.map Option.return s + ]} Note here that trying to reverse the order of the Option and State monads makes the [swap] function way harder to write. Moreover, the -- GitLab