let accb acc p a = match p a with | None -> false | Some(side_effect) -> acc := side_effect :: !acc; true