<div dir="ltr">Hello, Cafe:<div><br></div><div>Is there a preferred way to define two top-level mutually recursive functions, f and g, that both use a common local function h such that h is (1) only defined once and (2) does not escape the scope of f and g? I suppose it could be done like this:</div><div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><font face="monospace">fg = let f ... = ... f,g,h ...<br>         g ... = ... f,g,h ...<br>         h ... = ... h ...<br>      in (f,g)<br></font><font face="monospace">f = fst fg<br>g = snd fg<br></font> </blockquote>but is there something more elegant than this that I'm not seeing?<br></div><div><br></div><div>Todd Wilson</div></div>