12345678910111213141516171819202122232425262728293031323334353637383940414243(******************* Convenience functions **********************)letmyfoldlaf=List.fold_leftfalletmyrevmaplf=List.rev_mapflletmyrevmap2l1l2f=List.rev_map2fl1l2(* Builds a string from a list of items *)letsepmapspl=List.fold_left(funacux->ifacu=""thenmapxelseacu^sp^(mapx))""l(******************* Shortcuts to BIG INT ***********************)openBig_intlet(++)=add_big_intlet(+++)=add_int_big_intletsucc=succ_big_intlet(--)=sub_big_intletminus=minus_big_intlet(**)=mult_big_intlet(**.)=mult_int_big_intletquomod=quomod_big_intletbigmod=mod_big_intlet(*^)=power_int_positive_intletsign=sign_big_intlet(<==)=le_big_intletbig_compare=compare_big_intletbigzero=zero_big_intletbigone=unit_big_intletis_bigonex=big_comparexbigone=0letsob=string_of_big_intletbos=big_int_of_stringletboi=big_int_of_intletiob=int_of_big_int