Created
July 11, 2016 18:00
-
-
Save rgrinberg/3451fa6818d1f245f0bb3541132327d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* in reality you should wrap this function inside a parent function | |
that makes sure that an empty list wasn't passed. *) | |
let rec prepare_all dbh ~f = function | |
| [] -> f () | |
| query::qs -> | |
with_prepare dbh ~query ~f:(fun () -> prepare_all dbh ~f qs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment