12345678910111213141516171819202122232425262728293031323334(******************************************************************************)(* _ __ * The Kappa Language *)(* | |/ / * Copyright 2010-2020 CNRS - Harvard Medical School - INRIA - IRIF *)(* | ' / *********************************************************************)(* | . \ * This file is distributed under the terms of the *)(* |_|\_\ * GNU Lesser General Public License Version 3 *)(******************************************************************************)letunsomedefault=function|None->default|Somea->aletunsome_or_raise?(excep=Invalid_argument"unsome_or_raise was passed a None")=function|None->raiseexcep|Somea->aletmapf=function|Somex->Some(fx)|None->Noneletbindf=function|None->None|Someo->foletfoldfx=function|None->x|Somey->fxyletequaleqab=matcha,bwith|None,None->true|Some_,None|None,Some_->false|Somex,Somey->eqxy