var geometric = function(p) { return flip(p) ? 1 + geometric(p) : 1; }; Infer({maxExecutions: 10, model() { return geometric(0.5); }});