1234567891011121314151617181920212223242526(*---------------------------------------------------------------------------
Copyright (c) 2025 The more programmers. All rights reserved.
SPDX-License-Identifier: ISC
---------------------------------------------------------------------------*)includeStdlib.Resultletproductr0r1=matchr0,r1with|(Error_asr),_|_,(Error_asr)->r|Okv0,Okv1->Ok(v0,v1)letretract=functionOkv|Errorv->v(* Interacting with Stdlib exceptions *)leterror_to_failure=functionOkv->v|Errore->failwitheletget_ok'=functionOkv->v|Errore->invalid_arge(* Syntax *)moduleSyntax=structlet(let*)vf=bindvflet(and*)ab=productablet(let+)vf=mapfvlet(and+)ab=productabend