some code rearrangement so that we can use same code to apply polymonadiic bind and layered effects bind
some code rearrangement so that we can use same code to apply polymonadiic bind and layered effects bind

FStarLang/FStar,FStarLang/FStar,FStarLang/FStar