Proving Functional Correctness Of Monadic Programs Using Separation Logic