Megfelelni ilyen kovetelmenyeknek nem egyszeru, garantalni, hogy minden esetben meg fog felelni, az ennel is nehezebb.
Van, amit magasabb szintu nyelvekben egyszerubb kifejezni.
http://www.algo-prog.info/ocaml_for_pic/web/index.php?id=ocapic
https://forge.ocamlcore.org/docman/view.php/77/138/ocapic-ocamlmeeting-…